KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > build > ant > ZipFileSet


1 /*******************************************************************************
2  * Copyright (c) 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM - Initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.pde.internal.build.ant;
12
13 public class ZipFileSet extends FileSet {
14
15     String JavaDoc prefix;
16     boolean file;
17     String JavaDoc permission;
18     
19     /**
20      * @param dir
21      * @param defaultexcludes
22      * @param includes
23      * @param includesfile
24      * @param excludes
25      * @param excludesfile
26      * @param casesensitive
27      * @param permission
28      */

29     public ZipFileSet(String JavaDoc dir, boolean file, String JavaDoc defaultexcludes, String JavaDoc includes, String JavaDoc includesfile, String JavaDoc excludes, String JavaDoc excludesfile, String JavaDoc prefix, String JavaDoc casesensitive, String JavaDoc permission) {
30         super(dir, defaultexcludes, includes, includesfile, excludes, excludesfile, casesensitive);
31         this.prefix = prefix;
32         this.file = file;
33         this.permission = permission;
34     }
35     
36     protected void print(AntScript script) {
37         script.printTab();
38         script.print("<zipfileset"); //$NON-NLS-1$
39
if (file)
40             script.printAttribute("file", dir, false); //$NON-NLS-1$
41
else
42             script.printAttribute("dir", dir, false); //$NON-NLS-1$
43
script.printAttribute("defaultexcludes", defaultexcludes, false); //$NON-NLS-1$
44
script.printAttribute("includes", includes, false); //$NON-NLS-1$
45
script.printAttribute("includesfile", includesfile, false); //$NON-NLS-1$
46
script.printAttribute("excludes", excludes, false); //$NON-NLS-1$
47
script.printAttribute("excludesfile", excludesfile, false); //$NON-NLS-1$
48
script.printAttribute("casesensitive", casesensitive, false); //$NON-NLS-1$
49
if (file)
50             script.printAttribute("fullpath", prefix, false); //$NON-NLS-1$
51
else
52             script.printAttribute("prefix", prefix, false); //$NON-NLS-1$
53

54         if (file)
55             script.printAttribute("filemode", permission, false); //$NON-NLS-1$
56
else
57             script.printAttribute("dirmode", permission, false); //$NON-NLS-1$
58

59         script.println("/>"); //$NON-NLS-1$
60
}
61 }
62
Popular Tags