From c037d09f337cc811188856be6c39467ea6c1071e Mon Sep 17 00:00:00 2001 From: h7x4 Date: Tue, 23 Feb 2021 17:30:32 +0100 Subject: [PATCH] Add empty language class --- src/main/java/app/model/languages/Empty.java | 55 ++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 src/main/java/app/model/languages/Empty.java diff --git a/src/main/java/app/model/languages/Empty.java b/src/main/java/app/model/languages/Empty.java new file mode 100644 index 0000000..57d7697 --- /dev/null +++ b/src/main/java/app/model/languages/Empty.java @@ -0,0 +1,55 @@ +package app.model.languages; + +import java.net.URL; +import java.util.regex.Pattern; +import java.util.Map; + +import app.model.ProgrammingLanguage; + +public class Empty implements ProgrammingLanguage { + + private String name = "?"; + private URL iconPath = this.getClass().getResource(""); + + public String getName() { + return this.name; + } + + public URL getIcon() { + return this.iconPath; + } + + public Map getPatternMap() { + return Map.of(); + } + + public Pattern getPattern() { + return Pattern.compile(""); + } + + // ---------------------------------------------------------------- + + public String commentLine(String line) { + return line; + } + + public String unCommentLine(String line) { + return line; + } + + public boolean isCommentedLine(String line) { + return false; + } + + public String commentSelection(String selection) { + return selection; + } + + public String unCommentSelection(String selection) { + return selection; + } + + public boolean isCommentedSelection(String selection) { + return false; + } +}