Inspector | Message | Severity | Location |
---|---|---|---|
Java Inspector 048 | Copyrights information should be present in each file. | 1 | |
Java Inspector 089 | Type is not documented | 2 | 33:1 |
Java Inspector 089 | Method documentation is too short. It is only 2 words. Should be at least 3 words. | 2 | 43:5 |
Java Inspector 089 | Parameter destDir is not documented | 2 | 43:5 |
Java Inspector 089 | Method documentation is too short. It is only 2 words. Should be at least 3 words. | 2 | 50:5 |
Java Inspector 089 | Parameter dir is not documented | 2 | 50:5 |
Java Inspector 089 | Undocumented method | 2 | 96:5 |
Java Inspector 016 | Sun coding standards - class modifiers should be in order (public protected private abstract static final strictfp) | 3 | 34:5 |
Java Inspector 016 | Sun coding standards - class modifiers should be in order (public protected private abstract static final strictfp) | 3 | 35:5 |
Java Inspector 016 | Sun coding standards - class modifiers should be in order (public protected private abstract static final strictfp) | 3 | 36:5 |
1/*
2 * hgcommons 9
3 * Hammurapi Group Common Library
4 * Copyright (C) 2003 Hammurapi Group
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 * URL: http://www.hammurapi.biz/hammurapi-biz/ef/xmenu/hammurapi-group/products/products/hgcommons/index.html
21 * e-Mail: support@hammurapi.biz
22 */
23package biz.hammurapi.render.dom;
24
25import java.io.File;
26
27import org.apache.tools.ant.Task;
28
29/**
30 * @author Pavel Vlasov
31 * @version $Revision: 1.3 $
32 */
33public class StyleCompiler extends Task {
34 final static String POSTFIX="Translet";
35 final static char PROFILE_SEPARATOR='!';
36 final static char TRANSLET_PROFILE_SEPARATOR='_';
37
38 /**
39 * Destination directory
40 * @ant.required
41 * @param destDir
42 */
43 public void setDestDir(File destDir) {
44 }
45 /**
46 * Source directory
47 * @ant.required
48 * @param dir
49 */
50 public void setDir(File dir) {
51 }
52
53// public void execute() throws BuildException {
54// if (dir==null) {
55// throw new BuildException("Dir attribute is mandatory");
56// }
57// if (destDir==null) {
58// throw new BuildException("DestDir attribute is mandatory");
59// }
60// FileSet fileSet=new FileSet();
61// fileSet.setDir(dir);
62// fileSet.setIncludes("**/*.xsl,**/*.xslt");
63// String[] files = fileSet.getDirectoryScanner(getProject()).getIncludedFiles();
64// for (int i=0; i<files.length; i++) {
65// org.apache.xalan.xsltc.compiler.XSLTC xsltc=new org.apache.xalan.xsltc.compiler.XSLTC();
66// xsltc.init();
67// xsltc.setDestDirectory(destDir.getAbsolutePath());
68//
69// int idx=files[i].lastIndexOf(File.separator);
70// xsltc.setPackageName(idx==-1 ? "" : files[i].substring(0, idx).replace(File.separatorChar, '.'));
71// String className = idx==-1 ? files[i] : files[i].substring(idx+1);
72// idx=className.lastIndexOf('.');
73// if (idx!=-1) {
74// className=className.substring(0, idx);
75// }
76// idx=className.indexOf(PROFILE_SEPARATOR);
77// if (idx==-1) {
78// className+=POSTFIX;
79// } else {
80// className=className.substring(0, idx)+POSTFIX+TRANSLET_PROFILE_SEPARATOR+className.substring(idx+1);
81// }
82// log("Compiling "+files[i]+" into "+className, Project.MSG_INFO);
83// xsltc.setClassName(className);
84// try {
85// boolean result = xsltc.compile(new InputSource(new FileInputStream(new File(dir, files[i]))), null);
86// xsltc.printWarnings();
87// if (!result) {
88// xsltc.printErrors();
89// }
90// } catch (FileNotFoundException e) {
91// throw new BuildException(e);
92// }
93// }
94// }
95
96 public static void main(String[] args) {
97 }
98}
99