![JAR search and dependency download from the Maven repository](/logo.png)
net.sourceforge.plantuml.command.CommandSkinParamMultilines Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plantuml-mit Show documentation
Show all versions of plantuml-mit Show documentation
PlantUML is a component that allows to quickly write diagrams from text.
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml.command;
import net.sourceforge.plantuml.StringUtils;
import net.sourceforge.plantuml.TitledDiagram;
import net.sourceforge.plantuml.regex.Matcher2;
import net.sourceforge.plantuml.regex.MyPattern;
import net.sourceforge.plantuml.utils.BlocLines;
public class CommandSkinParamMultilines extends CommandMultilinesBracket {
public static final CommandSkinParamMultilines ME = new CommandSkinParamMultilines();
private CommandSkinParamMultilines() {
super("^skinparam[%s]*(?:[%s]+([\\w.]*(?:\\<\\<.*\\>\\>)?[\\w.]*))?[%s]*\\{$");
}
@Override
protected boolean isLineConsistent(String line, int level) {
line = StringUtils.trin(line);
if (hasStartingQuote(line))
return true;
return SkinLoader.p1.matcher(line).matches();
}
private boolean hasStartingQuote(CharSequence line) {
// return MyPattern.mtches(line, "[%s]*[%q].*");
return MyPattern.mtches(line, CommandMultilinesComment.COMMENT_SINGLE_LINE);
}
public CommandExecutionResult execute(TitledDiagram diagram, BlocLines lines) {
final SkinLoader skinLoader = new SkinLoader(diagram);
final Matcher2 mStart = getStartingPattern().matcher(lines.getFirst().getTrimmed().getString());
if (mStart.find() == false)
throw new IllegalStateException();
final String group1 = mStart.group(1);
return skinLoader.execute(lines, group1);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy