diff --git a/src/net/sourceforge/plantuml/annotation/DeadCode.java b/src/net/sourceforge/plantuml/annotation/DeadCode.java new file mode 100644 index 000000000..97f5a8e4c --- /dev/null +++ b/src/net/sourceforge/plantuml/annotation/DeadCode.java @@ -0,0 +1,13 @@ +package net.sourceforge.plantuml.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.SOURCE) +@Target({ ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.TYPE }) +public @interface DeadCode { + + String comment() default ""; +} diff --git a/src/net/sourceforge/plantuml/code/Tokens.java b/src/net/sourceforge/plantuml/code/Tokens.java index 8d034b945..57d3bcbe9 100644 --- a/src/net/sourceforge/plantuml/code/Tokens.java +++ b/src/net/sourceforge/plantuml/code/Tokens.java @@ -40,6 +40,9 @@ import java.util.List; import java.util.Set; import java.util.TreeSet; +import net.sourceforge.plantuml.annotation.DeadCode; + +@DeadCode(comment = "try for text diagram compression") public class Tokens { // ::remove file when __CORE__ diff --git a/src/net/sourceforge/plantuml/syntax/SyntaxChecker.java b/src/net/sourceforge/plantuml/syntax/SyntaxChecker.java index 7a343dce9..ef1eaca31 100644 --- a/src/net/sourceforge/plantuml/syntax/SyntaxChecker.java +++ b/src/net/sourceforge/plantuml/syntax/SyntaxChecker.java @@ -43,6 +43,7 @@ import net.sourceforge.plantuml.ErrorUml; import net.sourceforge.plantuml.OptionFlags; import net.sourceforge.plantuml.SourceStringReader; import net.sourceforge.plantuml.UmlDiagram; +import net.sourceforge.plantuml.annotation.DeadCode; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.error.PSystemError; import net.sourceforge.plantuml.preproc.Defines; @@ -50,8 +51,9 @@ import net.sourceforge.plantuml.text.BackSlash; import net.sourceforge.plantuml.utils.LineLocation; import net.sourceforge.plantuml.utils.LineLocationImpl; +@DeadCode(comment = "used too much CPU") public class SyntaxChecker { - // ::remove folder when __HAXE__ + // ::remove folder when __HAXE__ // ::remove file when __CORE__ public static SyntaxResult checkSyntax(List source) {