From 9fbddd599b64f023eb3b2b5d4218ff86b78e67c6 Mon Sep 17 00:00:00 2001 From: emmanue1 Date: Sun, 2 Jun 2019 07:41:20 +0200 Subject: [PATCH] Improve Java 9 modules syntax highlighting --- .../java/org/jd/gui/view/component/ModuleInfoFilePage.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/src/main/java/org/jd/gui/view/component/ModuleInfoFilePage.java b/services/src/main/java/org/jd/gui/view/component/ModuleInfoFilePage.java index 44333c7e..8222ab4a 100644 --- a/services/src/main/java/org/jd/gui/view/component/ModuleInfoFilePage.java +++ b/services/src/main/java/org/jd/gui/view/component/ModuleInfoFilePage.java @@ -123,7 +123,7 @@ public Token getTokenList(Segment text, int startTokenType, int startOffset) { switch (currentTokenType) { case Token.NULL: currentTokenStart = i; // Starting a new token here. - if (RSyntaxUtilities.isLetter(c) || c=='_') { + if (RSyntaxUtilities.isLetter(c) || (c == '_')) { currentTokenType = Token.IDENTIFIER; } else { currentTokenType = Token.WHITESPACE; @@ -131,14 +131,14 @@ public Token getTokenList(Segment text, int startTokenType, int startOffset) { break; default: // Should never happen case Token.WHITESPACE: - if (RSyntaxUtilities.isLetterOrDigit(c) || c=='_') { + if (RSyntaxUtilities.isLetter(c) || (c == '_')) { addToken(text, currentTokenStart, i-1, Token.WHITESPACE, newStartOffset+currentTokenStart); currentTokenStart = i; currentTokenType = Token.IDENTIFIER; } break; case Token.IDENTIFIER: - if (!RSyntaxUtilities.isLetterOrDigit(c) && c!='_') { + if (!RSyntaxUtilities.isLetterOrDigit(c) && (c != '_') && (c != '.')) { addToken(text, currentTokenStart, i-1, Token.IDENTIFIER, newStartOffset+currentTokenStart); currentTokenStart = i; currentTokenType = Token.WHITESPACE;