private String stateForOption(String option, Symbol symbol) { return ((option.equals("-setup") || option.equals("-teardown")) && symbol.getVariable("COLLAPSE_SETUP", "true").equals("true")) || option.equals("-c") ? Collapsible.CLOSED : ""; } }
private String stateForOption(String option, Symbol symbol) { return ((option.equals("-setup") || option.equals("-teardown")) && symbol.getVariable("COLLAPSE_SETUP", "true").equals("true")) || option.equals("-c") ? Collapsible.CLOSED : ""; } }
private String formatWikiWord(String originalName, Symbol symbol) { String regraceOption = symbol.getVariable(REGRACE_LINK, ""); return regraceOption.equals("true") ? GracefulNamer.regrace(originalName) : originalName; } }
private String formatWikiWord(String originalName, Symbol symbol) { String regraceOption = symbol.getVariable(REGRACE_LINK, ""); return regraceOption.equals("true") ? GracefulNamer.regrace(originalName) : originalName; } }
private boolean hasOption(String option, String variableName) { for (Symbol child: contents.getChildren()) { if (child.getContent().equals(option)) return true; } return !variableName.isEmpty() && contents.getVariable(variableName, "").equals("true"); }
private boolean hasOption(String option, String variableName) { for (Symbol child: contents.getChildren()) { if (child.getContent().equals(option)) return true; } return !variableName.isEmpty() && contents.getVariable(variableName, "").equals("true"); }
private String getBooleanProperties(SourcePage sourcePage) { String propChars = contents.getVariable(Contents.PROPERTY_CHARACTERS, Contents.PROPERTY_CHARACTERS_DEFAULT).trim(); if(propChars.length() != Contents.PROPERTY_CHARACTERS_DEFAULT.length() ){ propChars = Contents.PROPERTY_CHARACTERS_DEFAULT; } String result = ""; if (sourcePage.hasProperty(PageType.SUITE.toString())) result += propChars.charAt(0); if (sourcePage.hasProperty(PageType.TEST.toString())) result += propChars.charAt(1); if (sourcePage.hasProperty(WikiImportProperty.PROPERTY_NAME)) result += propChars.charAt(2); if (page != null && page instanceof WikiSourcePage){ if (((WikiSourcePage)page).hasSymbolicLinkChild(sourcePage.getName())) result += propChars.charAt(3); } if (sourcePage.hasProperty(WikiPageProperty.PRUNE)) result += propChars.charAt(4); return result; } private String getBooleanPropertiesClasses(SourcePage sourcePage) {
private String getBooleanProperties(SourcePage sourcePage) { String propChars = contents.getVariable(Contents.PROPERTY_CHARACTERS, Contents.PROPERTY_CHARACTERS_DEFAULT).trim(); if(propChars.length() != Contents.PROPERTY_CHARACTERS_DEFAULT.length() ){ propChars = Contents.PROPERTY_CHARACTERS_DEFAULT; } String result = ""; if (sourcePage.hasProperty(PageType.SUITE.toString())) result += propChars.charAt(0); if (sourcePage.hasProperty(PageType.TEST.toString())) result += propChars.charAt(1); if (sourcePage.hasProperty(WikiImportProperty.PROPERTY_NAME)) result += propChars.charAt(2); if (page != null && page instanceof WikiSourcePage){ if (((WikiSourcePage)page).hasSymbolicLinkChild(sourcePage.getName())) result += propChars.charAt(3); } if (sourcePage.hasProperty(WikiPageProperty.PRUNE)) result += propChars.charAt(4); return result; } private String getBooleanPropertiesClasses(SourcePage sourcePage) {
private HtmlTag buildListItem(SourcePage child) { HtmlTag listItem = buildItem(child); if (!child.getChildren().isEmpty()) { if (level < getRecursionLimit()) { listItem.add(new ContentsItemBuilder(contents, level + 1, child).buildLevel(child)); } else if (getRecursionLimit() > 0){ listItem.add(contents.getVariable(Contents.MORE_SUFFIX_TOC, Contents.MORE_SUFFIX_DEFAULT)); } } return listItem; }
private HtmlTag buildListItem(SourcePage child) { HtmlTag listItem = buildItem(child); if (!child.getChildren().isEmpty()) { if (level < getRecursionLimit()) { listItem.add(new ContentsItemBuilder(contents, level + 1, child).buildLevel(child)); } else if (getRecursionLimit() > 0){ listItem.add(contents.getVariable(Contents.MORE_SUFFIX_TOC, Contents.MORE_SUFFIX_DEFAULT)); } } return listItem; }