You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by ma...@apache.org on 2007/06/06 22:39:56 UTC
svn commit: r544977 - in
/incubator/ivy/core/trunk/src/java/org/apache/ivy/ant: AddPathTask.java
AntBuildTrigger.java
Author: maartenc
Date: Wed Jun 6 15:39:55 2007
New Revision: 544977
URL: http://svn.apache.org/viewvc?view=rev&rev=544977
Log:
fixed style
Modified:
incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/AddPathTask.java
incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/AntBuildTrigger.java
Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/AddPathTask.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/AddPathTask.java?view=diff&rev=544977&r1=544976&r2=544977
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/AddPathTask.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/AddPathTask.java Wed Jun 6 15:39:55 2007
@@ -31,73 +31,73 @@
* is to be able to contribute new sub path elements to an existing path.
*/
public class AddPathTask extends Task {
- private String _topath;
+ private String toPath;
- private boolean _first = false;
+ private boolean first = false;
- private Path _toadd;
+ private Path toAdd;
public String getTopath() {
- return _topath;
+ return toPath;
}
- public void setTopath(String topath) {
- _topath = topath;
+ public void setTopath(String toPath) {
+ this.toPath = toPath;
}
public void setProject(Project project) {
super.setProject(project);
- _toadd = new Path(project);
+ toAdd = new Path(project);
}
public void execute() throws BuildException {
- Object element = getProject().getReference(_topath);
+ Object element = getProject().getReference(toPath);
if (element == null) {
- throw new BuildException("destination path not found: " + _topath);
+ throw new BuildException("destination path not found: " + toPath);
}
if (!(element instanceof Path)) {
throw new BuildException("destination path is not a path: " + element.getClass());
}
Path dest = (Path) element;
- if (_first) {
+ if (first) {
// now way to add path elements at te beginning of the existing path: we do the opposite
// and replace the reference
- _toadd.append(dest);
- getProject().addReference(_topath, _toadd);
+ toAdd.append(dest);
+ getProject().addReference(toPath, toAdd);
} else {
- dest.append(_toadd);
+ dest.append(toAdd);
}
}
public void add(Path path) throws BuildException {
- _toadd.add(path);
+ toAdd.add(path);
}
public void addDirset(DirSet dset) throws BuildException {
- _toadd.addDirset(dset);
+ toAdd.addDirset(dset);
}
public void addFilelist(FileList fl) throws BuildException {
- _toadd.addFilelist(fl);
+ toAdd.addFilelist(fl);
}
public void addFileset(FileSet fs) throws BuildException {
- _toadd.addFileset(fs);
+ toAdd.addFileset(fs);
}
public Path createPath() throws BuildException {
- return _toadd.createPath();
+ return toAdd.createPath();
}
public PathElement createPathElement() throws BuildException {
- return _toadd.createPathElement();
+ return toAdd.createPathElement();
}
public boolean isFirst() {
- return _first;
+ return first;
}
public void setFirst(boolean first) {
- _first = first;
+ this.first = first;
}
}
Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/AntBuildTrigger.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/AntBuildTrigger.java?view=diff&rev=544977&r1=544976&r2=544977
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/AntBuildTrigger.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/AntBuildTrigger.java Wed Jun 6 15:39:55 2007
@@ -45,20 +45,20 @@
* @since 1.4
*/
public class AntBuildTrigger extends AbstractTrigger implements Trigger {
- private boolean _onlyonce = true;
+ private boolean onlyOnce = true;
- private String _target = null;
+ private String target = null;
- private Collection _builds = new ArrayList();
+ private Collection builds = new ArrayList();
- private String _buildFilePattern;
+ private String buildFilePattern;
- private String _prefix;
+ private String prefix;
public void progress(IvyEvent event) {
File f = getBuildFile(event);
if (f.exists()) {
- if (_onlyonce && isBuilt(f)) {
+ if (onlyOnce && isBuilt(f)) {
Message.verbose("target build file already built, skipping: " + f);
} else {
Ant ant = new Ant();
@@ -83,7 +83,7 @@
String key = (String) iter.next();
String value = (String) atts.get(key);
Property p = ant.createProperty();
- p.setName(_prefix == null ? key : _prefix + key);
+ p.setName(prefix == null ? key : prefix + key);
p.setValue(value);
}
@@ -112,11 +112,11 @@
}
private void markBuilt(File f) {
- _builds.add(f.getAbsolutePath());
+ builds.add(f.getAbsolutePath());
}
private boolean isBuilt(File f) {
- return _builds.contains(f.getAbsolutePath());
+ return builds.contains(f.getAbsolutePath());
}
private File getBuildFile(IvyEvent event) {
@@ -125,37 +125,37 @@
}
public String getBuildFilePattern() {
- return _buildFilePattern;
+ return buildFilePattern;
}
public void setAntfile(String pattern) {
- _buildFilePattern = pattern;
+ buildFilePattern = pattern;
}
public String getTarget() {
- return _target;
+ return target;
}
public void setTarget(String target) {
- _target = target;
+ this.target = target;
}
public boolean isOnlyonce() {
- return _onlyonce;
+ return onlyOnce;
}
public void setOnlyonce(boolean onlyonce) {
- _onlyonce = onlyonce;
+ onlyOnce = onlyonce;
}
public String getPrefix() {
- return _prefix;
+ return prefix;
}
public void setPrefix(String prefix) {
- _prefix = prefix;
+ this.prefix = prefix;
if (!prefix.endsWith(".")) {
- _prefix += ".";
+ this.prefix += ".";
}
}
}