Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 17 jdk.internal.le.jmod - Internal Line Editing Module
JDK 17 jdk.internal.le.jmod is the JMOD file for JDK 17 Internal Line Editing module.
JDK 17 Internal Line Editing module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.internal.le.jmod.
JDK 17 Internal Line Editing module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Internal Line Editing module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.internal.le.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/internal/org/jline/reader/impl/DefaultHighlighter.java
/* * Copyright (c) 2002-2021, the original author or authors. * * This software is distributable under the BSD license. See the terms of the * BSD license in the documentation provided with this software. * * https://opensource.org/licenses/BSD-3-Clause */ package jdk.internal.org.jline.reader.impl; import java.util.regex.Pattern; import jdk.internal.org.jline.reader.LineReader; import jdk.internal.org.jline.reader.LineReader.RegionType; import jdk.internal.org.jline.reader.Highlighter; import jdk.internal.org.jline.utils.AttributedString; import jdk.internal.org.jline.utils.AttributedStringBuilder; import jdk.internal.org.jline.utils.AttributedStyle; import jdk.internal.org.jline.utils.WCWidth; public class DefaultHighlighter implements Highlighter { protected Pattern errorPattern; protected int errorIndex = -1; @Override public void setErrorPattern(Pattern errorPattern) { this.errorPattern = errorPattern; } @Override public void setErrorIndex(int errorIndex) { this.errorIndex = errorIndex; } @Override public AttributedString highlight(LineReader reader, String buffer) { int underlineStart = -1; int underlineEnd = -1; int negativeStart = -1; int negativeEnd = -1; String search = reader.getSearchTerm(); if (search != null && search.length() > 0) { underlineStart = buffer.indexOf(search); if (underlineStart >= 0) { underlineEnd = underlineStart + search.length() - 1; } } if (reader.getRegionActive() != RegionType.NONE) { negativeStart = reader.getRegionMark(); negativeEnd = reader.getBuffer().cursor(); if (negativeStart > negativeEnd) { int x = negativeEnd; negativeEnd = negativeStart; negativeStart = x; } if (reader.getRegionActive() == RegionType.LINE) { while (negativeStart > 0 && reader.getBuffer().atChar(negativeStart - 1) != '\n') { negativeStart--; } while (negativeEnd < reader.getBuffer().length() - 1 && reader.getBuffer().atChar(negativeEnd + 1) != '\n') { negativeEnd++; } } } AttributedStringBuilder sb = new AttributedStringBuilder(); for (int i = 0; i < buffer.length(); i++) { if (i == underlineStart) { sb.style(AttributedStyle::underline); } if (i == negativeStart) { sb.style(AttributedStyle::inverse); } if (i == errorIndex) { sb.style(AttributedStyle::inverse); } char c = buffer.charAt(i); if (c == '\t' || c == '\n') { sb.append(c); } else if (c < 32) { sb.style(AttributedStyle::inverseNeg) .append('^') .append((char) (c + '@')) .style(AttributedStyle::inverseNeg); } else { int w = WCWidth.wcwidth(c); if (w > 0) { sb.append(c); } } if (i == underlineEnd) { sb.style(AttributedStyle::underlineOff); } if (i == negativeEnd) { sb.style(AttributedStyle::inverseOff); } if (i == errorIndex) { sb.style(AttributedStyle::inverseOff); } } if (errorPattern != null) { sb.styleMatches(errorPattern, AttributedStyle.INVERSE); } return sb.toAttributedString(); } }
⏎ jdk/internal/org/jline/reader/impl/DefaultHighlighter.java
Or download all of them as a single archive file:
File name: jdk.internal.le-17.0.5-src.zip File size: 231458 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.internal.opt.jmod - Internal Opt Module
⇐ JDK 17 jdk.internal.jvmstat.jmod - Internal JVM Stat Module
2023-08-25, 3933👍, 0💬
Popular Posts:
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
What Is mail.jar of JavaMail 1.4? I got the JAR file from javamail-1_4.zip. mail.jar in javamail-1_4...
JDK 11 jdk.jlink.jmod is the JMOD file for JDK 11 JLink tool, which can be invoked by the "jlink" co...
commons-lang-1.0.1.jar is the JAR file for Apache Commons Lang 1.0.1, which provides a host of helpe...
What is ojdbc.jar - JDBC Driver for Oracle? ojdbc.jar is a JDBC driver from Oracle that provides dat...