Java Code Examples for com.sun.tools.javac.util.BasicDiagnosticFormatter.BasicConfiguration#getIndentation()
The following examples show how to use
com.sun.tools.javac.util.BasicDiagnosticFormatter.BasicConfiguration#getIndentation() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BasicDiagnosticFormatter.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
protected String addSourceLineIfNeeded(JCDiagnostic d, String msg) { if (!displaySource(d)) return msg; else { BasicConfiguration conf = getConfiguration(); int indentSource = conf.getIndentation(DiagnosticPart.SOURCE); String sourceLine = "\n" + formatSourceLine(d, indentSource); boolean singleLine = msg.indexOf("\n") == -1; if (singleLine || getConfiguration().getSourcePosition() == SourcePosition.BOTTOM) return msg + sourceLine; else return msg.replaceFirst("\n", Matcher.quoteReplacement(sourceLine) + "\n"); } }
Example 2
Source File: BasicDiagnosticFormatter.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
protected String addSourceLineIfNeeded(JCDiagnostic d, String msg) { if (!displaySource(d)) return msg; else { BasicConfiguration conf = getConfiguration(); int indentSource = conf.getIndentation(DiagnosticPart.SOURCE); String sourceLine = "\n" + formatSourceLine(d, indentSource); boolean singleLine = msg.indexOf("\n") == -1; if (singleLine || getConfiguration().getSourcePosition() == SourcePosition.BOTTOM) return msg + sourceLine; else return msg.replaceFirst("\n", Matcher.quoteReplacement(sourceLine) + "\n"); } }
Example 3
Source File: BasicDiagnosticFormatter.java From java-n-IDE-for-Android with Apache License 2.0 | 5 votes |
protected String addSourceLineIfNeeded(JCDiagnostic d, String msg) { if (!displaySource(d)) return msg; else { BasicConfiguration conf = getConfiguration(); int indentSource = conf.getIndentation(DiagnosticPart.SOURCE); String sourceLine = "\n" + formatSourceLine(d, indentSource); boolean singleLine = msg.indexOf("\n") == -1; if (singleLine || getConfiguration().getSourcePosition() == SourcePosition.BOTTOM) return msg + sourceLine; else return msg.replaceFirst("\n", Matcher.quoteReplacement(sourceLine) + "\n"); } }
Example 4
Source File: BasicDiagnosticFormatter.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
protected String addSourceLineIfNeeded(JCDiagnostic d, String msg) { if (!displaySource(d)) return msg; else { BasicConfiguration conf = getConfiguration(); int indentSource = conf.getIndentation(DiagnosticPart.SOURCE); String sourceLine = "\n" + formatSourceLine(d, indentSource); boolean singleLine = msg.indexOf("\n") == -1; if (singleLine || getConfiguration().getSourcePosition() == SourcePosition.BOTTOM) return msg + sourceLine; else return msg.replaceFirst("\n", Matcher.quoteReplacement(sourceLine) + "\n"); } }
Example 5
Source File: BasicDiagnosticFormatter.java From lua-for-android with BSD 3-Clause "New" or "Revised" License | 5 votes |
protected String addSourceLineIfNeeded(JCDiagnostic d, String msg) { if (!displaySource(d)) return msg; else { BasicConfiguration conf = getConfiguration(); int indentSource = conf.getIndentation(DiagnosticPart.SOURCE); String sourceLine = "\n" + formatSourceLine(d, indentSource); boolean singleLine = !msg.contains("\n"); if (singleLine || getConfiguration().getSourcePosition() == SourcePosition.BOTTOM) return msg + sourceLine; else return msg.replaceFirst("\n", Matcher.quoteReplacement(sourceLine) + "\n"); } }
Example 6
Source File: BasicDiagnosticFormatter.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
protected String addSourceLineIfNeeded(JCDiagnostic d, String msg) { if (!displaySource(d)) return msg; else { BasicConfiguration conf = getConfiguration(); int indentSource = conf.getIndentation(DiagnosticPart.SOURCE); String sourceLine = "\n" + formatSourceLine(d, indentSource); boolean singleLine = msg.indexOf("\n") == -1; if (singleLine || getConfiguration().getSourcePosition() == SourcePosition.BOTTOM) return msg + sourceLine; else return msg.replaceFirst("\n", Matcher.quoteReplacement(sourceLine) + "\n"); } }
Example 7
Source File: BasicDiagnosticFormatter.java From javaide with GNU General Public License v3.0 | 5 votes |
protected String addSourceLineIfNeeded(JCDiagnostic d, String msg) { if (!displaySource(d)) return msg; else { BasicConfiguration conf = getConfiguration(); int indentSource = conf.getIndentation(DiagnosticPart.SOURCE); String sourceLine = "\n" + formatSourceLine(d, indentSource); boolean singleLine = msg.indexOf("\n") == -1; if (singleLine || getConfiguration().getSourcePosition() == SourcePosition.BOTTOM) return msg + sourceLine; else return msg.replaceFirst("\n", Matcher.quoteReplacement(sourceLine) + "\n"); } }
Example 8
Source File: BasicDiagnosticFormatter.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
protected String addSourceLineIfNeeded(JCDiagnostic d, String msg) { if (!displaySource(d)) return msg; else { BasicConfiguration conf = getConfiguration(); int indentSource = conf.getIndentation(DiagnosticPart.SOURCE); String sourceLine = "\n" + formatSourceLine(d, indentSource); boolean singleLine = !msg.contains("\n"); if (singleLine || getConfiguration().getSourcePosition() == SourcePosition.BOTTOM) return msg + sourceLine; else return msg.replaceFirst("\n", Matcher.quoteReplacement(sourceLine) + "\n"); } }
Example 9
Source File: BasicDiagnosticFormatter.java From hottub with GNU General Public License v2.0 | 5 votes |
protected String addSourceLineIfNeeded(JCDiagnostic d, String msg) { if (!displaySource(d)) return msg; else { BasicConfiguration conf = getConfiguration(); int indentSource = conf.getIndentation(DiagnosticPart.SOURCE); String sourceLine = "\n" + formatSourceLine(d, indentSource); boolean singleLine = msg.indexOf("\n") == -1; if (singleLine || getConfiguration().getSourcePosition() == SourcePosition.BOTTOM) return msg + sourceLine; else return msg.replaceFirst("\n", Matcher.quoteReplacement(sourceLine) + "\n"); } }
Example 10
Source File: BasicDiagnosticFormatter.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
protected String addSourceLineIfNeeded(JCDiagnostic d, String msg) { if (!displaySource(d)) return msg; else { BasicConfiguration conf = getConfiguration(); int indentSource = conf.getIndentation(DiagnosticPart.SOURCE); String sourceLine = "\n" + formatSourceLine(d, indentSource); boolean singleLine = msg.indexOf("\n") == -1; if (singleLine || getConfiguration().getSourcePosition() == SourcePosition.BOTTOM) return msg + sourceLine; else return msg.replaceFirst("\n", Matcher.quoteReplacement(sourceLine) + "\n"); } }
Example 11
Source File: BasicDiagnosticFormatter.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
protected String addSourceLineIfNeeded(JCDiagnostic d, String msg) { if (!displaySource(d)) return msg; else { BasicConfiguration conf = getConfiguration(); int indentSource = conf.getIndentation(DiagnosticPart.SOURCE); String sourceLine = "\n" + formatSourceLine(d, indentSource); boolean singleLine = msg.indexOf("\n") == -1; if (singleLine || getConfiguration().getSourcePosition() == SourcePosition.BOTTOM) return msg + sourceLine; else return msg.replaceFirst("\n", Matcher.quoteReplacement(sourceLine) + "\n"); } }