Package com.granule

Examples of com.granule.FragmentDescriptor


            List<FragmentDescriptor> inputFragments = new ArrayList<FragmentDescriptor>();
            for (FragmentDescriptor sd : list)
                inputFragments.add(sd.clone());
           
            //Put base descriptor on first place
            FragmentDescriptor baseDescriptor = inputFragments.get(baseFileIndex);
            inputFragments.remove(baseFileIndex);
            inputFragments.add(0, baseDescriptor);
           
            calcRealPathes(inputFragments, request);
           
View Full Code Here


        }
    }

    private void calcRealPathes(List<FragmentDescriptor> list, IRequestProxy request) {
        for (int i = 0; i < list.size(); i++) {
            FragmentDescriptor fd = list.get(i);
            if (fd instanceof ExternalFragment) {
                String filename = ((ExternalFragment) fd).getFilePath();
                filename = PathUtils.clean(request.getRealPath(filename));
                AbsolutePathFragment newFragment = new AbsolutePathFragment(filename);
                list.remove(i);
View Full Code Here

        String root = request.getRealPath("./");
        if (root.replace('\\','/').endsWith("/."))
           root = root.substring(0, root.length()-2);
        root = PathUtils.clean(root);
        for (int i = 0; i < list.size(); i++) {
            FragmentDescriptor fd = list.get(i);
            if (fd instanceof AbsolutePathFragment) {
                String filename = ((AbsolutePathFragment) fd).getFilePath();
                filename = PathUtils.getRelpath(filename, root);
                ExternalFragment newFragment = new ExternalFragment(filename);
                list.remove(i);
View Full Code Here

                        if (addFile) {
                            String filename;
                            if (replaceInfo.text.startsWith("/"))
                                filename = replaceInfo.text;
                            else filename = cssPath;
                            FragmentDescriptor imp = new ExternalFragment(filename);
                            deps.add(imp);
                            sb.append(handle(imp, request, settings, deps));
                        }
                    }
                    start = replaceInfo.end;
View Full Code Here

                + "                    goog.dom.setTextContent(document.getElementById('label_dp'), event.date ?\n"
                + "                            event.date.toIsoString(true) : 'none');\n" + "                });\n"
                + "\n" + "        goog.dom.setTextContent(document.getElementById('label_dp'),\n"
                + "                dp.getDate().toIsoString(true));";
        List<FragmentDescriptor> fragments = new ArrayList<FragmentDescriptor>();
        FragmentDescriptor fd = new ExternalFragment("js/closure/goog/base.js");
        fragments.add(fd);
        fd = new InternalFragment(testCode);
        fragments.add(fd);

        CalcDeps cd = new CalcDeps();
View Full Code Here

TOP

Related Classes of com.granule.FragmentDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.