Java 8 CSSImportRule - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 CSSImportRule class.

This code example shows how to use the following methods:getHref
    } 
 
    @Override 
    public void visitImportRule(CSSImportRule rule) {
        // TODO nick - process imported stylesheet? 
        String resourceName = rule.getHref();
        String libraryName = null;
        if (ELUtils.isValueReference(resourceName)) {
            if (resourceName.indexOf(RESOURCE_START_PREFIX) == -1) {
                resourceName = facesContext.getApplication().evaluateExpressionGet(facesContext, resourceName, String.class);
            } else { 
                int start = resourceName.indexOf(RESOURCE_START_PREFIX) + RESOURCE_START_PREFIX.length();
                int end = resourceName.lastIndexOf("]");
                resourceName = resourceName.substring(start, end);
                resourceName = resourceName.replaceAll("\"", "").replaceAll("'", "").trim();
            } 
 
            if (resourceName.contains(":")) {
                String[] split = resourceName.split(":", 2);
                libraryName = split[0];
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getHref
    } 
 
    @Override 
    public void visitImportRule(CSSImportRule rule) {
        // TODO nick - process imported stylesheet? 
        String resourceName = rule.getHref();
        if (ELUtils.isValueReference(resourceName)) {
            if (resourceName.indexOf(RESOURCE_START_PREFIX) == -1) {
                resourceName = facesContext.getApplication().evaluateExpressionGet(facesContext, resourceName, String.class);
            } else { 
                int start = resourceName.indexOf(RESOURCE_START_PREFIX) + RESOURCE_START_PREFIX.length();
                int end = resourceName.lastIndexOf("]");
                resourceName = resourceName.substring(start, end);
                resourceName = resourceName.replaceAll("\"", "").replaceAll("'", "").trim();
            } 
        } 
        Resource imported = facesContext.getApplication().getResourceHandler().createResource(resourceName);
        if (imported == null) {
            LOGGER.error("Resource with name " + resourceName + "can't be found.");
            return; 
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Java 8 CSSImportRule Methods: