-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14722 from ejba/fix-codestarts-icons-14219
Avoid print icons when running on Windows OS
- Loading branch information
Showing
6 changed files
with
36 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 18 additions & 7 deletions
25
...ts/tools/message-writer/src/main/java/io/quarkus/devtools/messagewriter/MessageIcons.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
package io.quarkus.devtools.messagewriter; | ||
|
||
public final class MessageIcons { | ||
import io.smallrye.common.os.OS; | ||
|
||
public static final String OK_ICON = "\u2705"; | ||
public static final String NOK_ICON = "\u274c"; | ||
public static final String NOOP_ICON = "\uD83D\uDC4D"; | ||
public static final String WARN_ICON = "\uD83D\uDD25"; | ||
public static final String ERROR_ICON = "\u2757"; | ||
public enum MessageIcons { | ||
|
||
private MessageIcons() { | ||
OK_ICON("\u2705", "[SUCCESS]"), | ||
NOK_ICON("\u274c", "[FAILURE]"), | ||
NOOP_ICON("\uD83D\uDC4D", ""), | ||
WARN_ICON("\uD83D\uDD25", "[WARN]"), | ||
ERROR_ICON("\u2757", "[ERROR]"); | ||
|
||
private String icon; | ||
private String messageCode; | ||
|
||
MessageIcons(String icon, String messageCode) { | ||
this.icon = icon; | ||
this.messageCode = messageCode; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return OS.WINDOWS.isCurrent() ? messageCode : String.format("%s %s", messageCode, icon); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters