List of usage examples for java.lang System lineSeparator
String lineSeparator
To view the source code for java.lang System lineSeparator.
Click Source Link
From source file:at.ac.univie.isc.asio.AsioSettings.java
@Override public String toString() { return "AsioSettings{" + "timeout=" + timeout + ", home='" + home + '\'' + ", metadataRepository=" + metadataRepository + System.lineSeparator() + ", api=" + api + System.lineSeparator() + ", feature=" + feature + System.lineSeparator() + ", jdbc=" + jdbc + System.lineSeparator() + '}'; }
From source file:com.blackducksoftware.integration.hub.detect.testutils.TestUtil.java
public String getResourceAsUTF8String(final String resourcePath) { final String data; try {/* ww w. j a v a 2 s .c om*/ data = ResourceUtil.getResourceAsString(getClass(), resourcePath, StandardCharsets.UTF_8.toString()); } catch (final IOException e) { throw new RuntimeException(e); } return Arrays.asList(data.split("\r?\n")).stream().collect(Collectors.joining(System.lineSeparator())); }
From source file:com.opendoorlogistics.components.geocode.postcodes.impl.SummaryPanel.java
public void setFile(ODLApi api, String filename) { if (filename != null) { File file = PCConstants.resolvePostcodeFile(api, new File(filename)); if (file.exists()) { if (file.isFile() && FilenameUtils.getExtension(filename).toLowerCase() .equals(PCConstants.DBFILE_EXTENSION)) { text.setText("Currently parsing: " + System.lineSeparator() + filename); ParseFileWorker parseFileWorker = new ParseFileWorker(file); parseFileWorker.execute(); } else { text.setText("File is not a postcode geocode file (." + PCConstants.DBFILE_EXTENSION + "): " + System.lineSeparator() + filename); }//from ww w .j a v a2 s . c om } else { text.setText("File does not exist: " + System.lineSeparator() + filename); } } else { text.setText("No file set"); } }
From source file:io.cloudslang.lang.compiler.parser.DescriptionBuilder.java
public void addToDescription(String tag, String content) { String tagContent = currentDescription.get(tag); tagContent = tagContent == null ? "" : tagContent; if (StringUtils.isNotBlank(content)) { if (org.apache.commons.lang.StringUtils.isNotEmpty(tagContent)) { tagContent += System.lineSeparator(); }/*from w ww.j a v a 2 s . c o m*/ tagContent += content; } currentDescription.put(tag, tagContent); mostRecentlyUsedTag = tag; }
From source file:net.thirdy.blackmarket.controls.Dialogs.java
public static void showExceptionDialog(Throwable throwable) { Alert alert = new Alert(AlertType.ERROR); alert.setTitle("Sorry something wrong happened"); String header = throwable.getMessage(); header = isBlank(header) ? throwable.getClass().getSimpleName() : header; alert.setHeaderText(header);/* ww w .ja va2 s. c o m*/ // alert.setGraphic(new ImageView(ImageCache.getInstance().get("/images/gallio/gallio-" // + comics[RandomUtils.nextInt(0, 3)] + // ".png"))); alert.setGraphic(new ImageView(ImageCache.getInstance().get("/images/gallio/gallio-sad.png"))); // Create expandable Exception. StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); throwable.printStackTrace(pw); String exceptionText = sw.toString(); StringBuilder sb = new StringBuilder(); // sb.append("Error Message: "); // sb.append(System.lineSeparator()); // sb.append(throwable.getMessage()); sb.append("The exception stacktrace was:"); sb.append(System.lineSeparator()); sb.append(exceptionText); TextArea textArea = new TextArea(sb.toString()); textArea.setEditable(false); textArea.setWrapText(false); textArea.setMaxWidth(Double.MAX_VALUE); textArea.setMaxHeight(150); // Set expandable Exception into the dialog pane. alert.getDialogPane().setExpandableContent(textArea); alert.getDialogPane().setExpanded(true); alert.showAndWait(); }
From source file:com.jslsolucoes.tagria.lib.grid.exporter.impl.CsvExporter.java
private void header(StringBuilder csv) { List<String> headers = new ArrayList<>(); for (Header header : table.getHeaders()) { headers.add(header.getContent()); }/*from w w w.j a va2s. co m*/ csv.append(StringUtils.join(headers.toArray(), ",").concat(System.lineSeparator())); }
From source file:org.smigo.species.SpeciesHandler.java
public void deleteSpecies(int deleteId, int replaceId) { if (replaceId != 0) { List<Plant> restore = plantHandler.getPlants(deleteId); mailHandler.sendAdminNotification("plants replaced", "Old:" + deleteId + " New:" + replaceId + System.lineSeparator() + restore.toString()); plantHandler.replaceSpecies(deleteId, replaceId); }//from www .j a va 2 s . c om speciesDao.deleteSpecies(deleteId); }
From source file:minij.flowanalysis.FlowAnalyser.java
public static SimpleGraph<CoalesceableTemp> analyseFlow(Configuration config, List<Assem> body, String methodName) throws FlowAnalyserException { try {//w ww .j av a2 s .co m SimpleGraph<Assem> controlFlowGraph = ControlFlowGraphBuilder.build(body, methodName); Map<Assem, LivenessSetsBuilder.InOut> inOut = LivenessSetsBuilder.build(controlFlowGraph, body); SimpleGraph<CoalesceableTemp> interferenceGraph = InterferenceGraphBuilder.build(controlFlowGraph, inOut); if (config.printInterferenceGraphs) { Logger.log(interferenceGraph.getDot()); } int maxInterference = 0; I386PrintAssemblyVisitor visitor = new I386PrintAssemblyVisitor(); Iterator<Assem> iter = body.iterator(); StringBuilder inOutStringBuilder = new StringBuilder(); if (config.printFlowAnalysisDetails) { while (iter.hasNext()) { Assem next = iter.next(); String nextString = StringUtils.rightPad(next.accept(visitor), 30); String padding = StringUtils.rightPad("", 30); String separator = StringUtils.rightPad("", 100, '-'); LivenessSetsBuilder.InOut inOutN = inOut.get(next); if (inOutN.in.size() > maxInterference) { maxInterference = inOutN.in.size(); } if (inOutN.out.size() > maxInterference) { maxInterference = inOutN.out.size(); } inOutStringBuilder.append(nextString).append(" in: ").append(inOutN.in) .append(System.lineSeparator()).append(padding).append(" out:").append(inOutN.out) .append(System.lineSeparator()).append(separator).append(System.lineSeparator()); } inOutStringBuilder.append("Max interference: ").append(maxInterference); Logger.log(inOutStringBuilder.toString()); } return interferenceGraph; } catch (Exception e) { throw new FlowAnalyserException("Failed to analyse control flow", e); } }
From source file:de.micromata.genome.util.strings.ReducedMultiLineStyle.java
@Override protected void appendContentEnd(StringBuffer buffer) { int level = ReducedReflectionToStringBuilder.getRegistryObject().level; buffer.append(System.lineSeparator()); for (int i = 0; i <= level; ++i) { buffer.append(" "); }/*from w w w . j a v a 2 s . com*/ buffer.append("]"); }
From source file:com.synopsys.integration.test.tool.TestLogger.java
public String getOutputString() { return StringUtils.join(outputList, System.lineSeparator()); }