@Override @Nullable public ScssGlobalFlagTree globalFlag() { Optional<ScssGlobalFlagTree> globalFlag = value.firstValueElementOfType(ScssGlobalFlagTree.class); return globalFlag.isPresent() ? globalFlag.get() : null; }
@Override @Nullable public ScssDefaultFlagTree defaultFlag() { Optional<ScssDefaultFlagTree> defaultFlag = value.firstValueElementOfType(ScssDefaultFlagTree.class); return defaultFlag.isPresent() ? defaultFlag.get() : null; }
@Override @Nullable public ScssGlobalFlagTree globalFlag() { Optional<ScssGlobalFlagTree> globalFlag = value.firstValueElementOfType(ScssGlobalFlagTree.class); return globalFlag.isPresent() ? globalFlag.get() : null; }
@Override @Nullable public ScssDefaultFlagTree defaultFlag() { Optional<ScssDefaultFlagTree> defaultFlag = value.firstValueElementOfType(ScssDefaultFlagTree.class); return defaultFlag.isPresent() ? defaultFlag.get() : null; }
private void checkSecondToLastSrcPropertyDeclaration(PropertyDeclarationTree declaration) { PropertyTree property = declaration.property(); ValueTree value = declaration.value(); if (value.valueElementsOfType(UriTree.class).size() != 1) { addPreciseIssue( property, "Define one single URL, the URL for the \".eot\" font file in this \"src\" property (to support IE9 Compatibility Modes)."); } else { String font = ""; Optional<UriTree> uri = value.firstValueElementOfType(UriTree.class); if (uri.isPresent() && uri.get().uriContent() != null) { font = uri.get().uriContent().text(); } if (!EOT_PATTERN.matcher(font).matches()) { addPreciseIssue( property, "Set the URL for the \".eot\" file in this \"src\" property (to support IE9 Compatibility Modes)."); } else if (!value.valueElementsOfType(FunctionTree.class).isEmpty()) { addPreciseIssue( property, "Remove additional functions from this \"src\" property (to support IE9 Compatibility Modes)."); } } }
private void checkSecondToLastSrcPropertyDeclaration(PropertyDeclarationTree declaration) { PropertyTree property = declaration.property(); ValueTree value = declaration.value(); if (value.valueElementsOfType(UriTree.class).size() != 1) { addPreciseIssue( property, "Define one single URL, the URL for the \".eot\" font file in this \"src\" property (to support IE9 Compatibility Modes)."); } else { String font = ""; Optional<UriTree> uri = value.firstValueElementOfType(UriTree.class); if (uri.isPresent() && uri.get().uriContent() != null) { font = uri.get().uriContent().text(); } if (!EOT_PATTERN.matcher(font).matches()) { addPreciseIssue( property, "Set the URL for the \".eot\" file in this \"src\" property (to support IE9 Compatibility Modes)."); } else if (!value.valueElementsOfType(FunctionTree.class).isEmpty()) { addPreciseIssue( property, "Remove additional functions from this \"src\" property (to support IE9 Compatibility Modes)."); } } }