Remove all old shortcode converter references

This commit is contained in:
JeremyStar™ 2024-11-05 21:16:42 +01:00
parent ea93d12151
commit 7cf9a4f418
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
4 changed files with 10 additions and 11 deletions

View file

@ -29,7 +29,7 @@ import java.util.LinkedList;
import java.util.Locale;
/**
* Base class for implementing a shortcode converter.
* Base class for implementing a shortcode parser.
* <p>
* This class parses a string and converts it into a list of
* components, which can then be in turn be converted to something

View file

@ -23,9 +23,8 @@ import de.staropensource.engine.base.EngineConfiguration;
import de.staropensource.engine.base.implementable.LoggingAdapter;
import de.staropensource.engine.base.logging.Logger;
import de.staropensource.engine.base.type.logging.LogLevel;
import de.staropensource.engine.base.implementation.shortcode.EmptyShortcodeConverter;
import de.staropensource.engine.base.implementation.shortcode.EmptyShortcodeParser;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Prints log messages to the console, without any fancy colors or formatting.
@ -45,7 +44,7 @@ public class PlainLoggingAdapter implements LoggingAdapter {
/** {@inheritDoc} */
@Override
public void print(@NotNull LogLevel level, @NotNull StackTraceElement issuer, @NotNull String message, @NotNull String format) {
format = new EmptyShortcodeConverter(format, true).getClean();
format = new EmptyShortcodeParser(format, true).getClean();
if (level == LogLevel.ERROR || level == LogLevel.CRASH)
if (EngineConfiguration.getInstance() != null && EngineConfiguration.getInstance().isLogForceStandardOutput())
System.out.println(format);

View file

@ -27,18 +27,18 @@ import org.jetbrains.annotations.NotNull;
* Cleans the string of any tags.
*
* @see ShortcodeParser
* @since v1-alpha1
* @since v1-alpha8
*/
public final class EmptyShortcodeConverter extends ShortcodeParser {
public final class EmptyShortcodeParser extends ShortcodeParser {
/**
* Creates and initializes an instance of this class.
*
* @param string string to parse
* @param ignoreInvalidEscapes if {@code true}, will ignore and treat invalid escapes as text
* @throws ParserException on error
* @since v1-alpha1
* @since v1-alpha8
*/
public EmptyShortcodeConverter(@NotNull String string, boolean ignoreInvalidEscapes) throws ParserException {
public EmptyShortcodeParser(@NotNull String string, boolean ignoreInvalidEscapes) throws ParserException {
super(string, ignoreInvalidEscapes);
}
@ -46,7 +46,7 @@ public final class EmptyShortcodeConverter extends ShortcodeParser {
* Returns the parsed string without any tags.
*
* @return cleaned input string
* @since v1-alpha1
* @since v1-alpha8
*/
public @NotNull String getClean() {
StringBuilder output = new StringBuilder();

View file

@ -20,7 +20,7 @@
package de.staropensource.engine.base.logging.backend;
import de.staropensource.engine.base.EngineConfiguration;
import de.staropensource.engine.base.implementation.shortcode.EmptyShortcodeConverter;
import de.staropensource.engine.base.implementation.shortcode.EmptyShortcodeParser;
import de.staropensource.engine.base.logging.Logger;
import de.staropensource.engine.base.logging.backend.async.LoggingQueue;
import de.staropensource.engine.base.type.logging.LogLevel;
@ -349,7 +349,7 @@ public final class Processor {
builder.append(sanitizeFormat(handlePlaceholders(
message.replace(
"\n",
"\n" + " ".repeat(new EmptyShortcodeConverter(builder.toString(), true).getClean().length())
"\n" + " ".repeat(new EmptyShortcodeParser(builder.toString(), true).getClean().length())
)
)));
}