01: /*******************************************************************************
02: * Copyright (c) 2004 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM - Initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.build.ant;
11:
12: public class ZipFileSet extends FileSet {
13:
14: String prefix;
15: boolean file;
16: String permission;
17:
18: /**
19: * @param dir
20: * @param defaultexcludes
21: * @param includes
22: * @param includesfile
23: * @param excludes
24: * @param excludesfile
25: * @param casesensitive
26: * @param permission
27: */
28: public ZipFileSet(String dir, boolean file, String defaultexcludes,
29: String includes, String includesfile, String excludes,
30: String excludesfile, String prefix, String casesensitive,
31: String permission) {
32: super (dir, defaultexcludes, includes, includesfile, excludes,
33: excludesfile, casesensitive);
34: this .prefix = prefix;
35: this .file = file;
36: this .permission = permission;
37: }
38:
39: protected void print(AntScript script) {
40: script.printTab();
41: script.print("<zipfileset"); //$NON-NLS-1$
42: if (file)
43: script.printAttribute("file", dir, false); //$NON-NLS-1$
44: else
45: script.printAttribute("dir", dir, false); //$NON-NLS-1$
46: script
47: .printAttribute(
48: "defaultexcludes", defaultexcludes, false); //$NON-NLS-1$
49: script.printAttribute("includes", includes, false); //$NON-NLS-1$
50: script.printAttribute("includesfile", includesfile, false); //$NON-NLS-1$
51: script.printAttribute("excludes", excludes, false); //$NON-NLS-1$
52: script.printAttribute("excludesfile", excludesfile, false); //$NON-NLS-1$
53: script.printAttribute("casesensitive", casesensitive, false); //$NON-NLS-1$
54: if (file)
55: script.printAttribute("fullpath", prefix, false); //$NON-NLS-1$
56: else
57: script.printAttribute("prefix", prefix, false); //$NON-NLS-1$
58:
59: if (file)
60: script.printAttribute("filemode", permission, false); //$NON-NLS-1$
61: else
62: script.printAttribute("dirmode", permission, false); //$NON-NLS-1$
63:
64: script.println("/>"); //$NON-NLS-1$
65: }
66: }
|