summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelder2006-09-14 10:31:05 (EDT)
committer pelder2006-09-14 10:31:05 (EDT)
commitf0bf6c532a61e8c92c19234bb455f334f8370405 (patch)
tree443eae1195ef8d2a76a1af1e7c19916411fa3a1c
parentb2be446dbe99da111d49a58351311202769c9174 (diff)
downloadorg.eclipse.jet-f0bf6c532a61e8c92c19234bb455f334f8370405.zip
org.eclipse.jet-f0bf6c532a61e8c92c19234bb455f334f8370405.tar.gz
org.eclipse.jet-f0bf6c532a61e8c92c19234bb455f334f8370405.tar.bz2
[157319] Add additional check on JET ant task parameters.
-rw-r--r--plugins/org.eclipse.jet/antsrc/org/eclipse/jet/ant/tasks/JETCompileTask.java1
-rw-r--r--plugins/org.eclipse.jet/antsrc/org/eclipse/jet/ant/tasks/JETTransformTask.java6
2 files changed, 6 insertions, 1 deletions
diff --git a/plugins/org.eclipse.jet/antsrc/org/eclipse/jet/ant/tasks/JETCompileTask.java b/plugins/org.eclipse.jet/antsrc/org/eclipse/jet/ant/tasks/JETCompileTask.java
index ecca6e8..b212396 100644
--- a/plugins/org.eclipse.jet/antsrc/org/eclipse/jet/ant/tasks/JETCompileTask.java
+++ b/plugins/org.eclipse.jet/antsrc/org/eclipse/jet/ant/tasks/JETCompileTask.java
@@ -69,6 +69,7 @@ public class JETCompileTask extends Task {
private void validate() {
if(destdir == null) throw new BuildException("destdir not set");
if(srcFilesets.size() == 0) throw new BuildException("srcdir not set");
+ if(eclipseProject == null) throw new BuildException("project not set");
if(!eclipseProject.exists()) throw new BuildException("project does not exist");
if(!eclipseProject.isOpen()) throw new BuildException("project is not open");
}
diff --git a/plugins/org.eclipse.jet/antsrc/org/eclipse/jet/ant/tasks/JETTransformTask.java b/plugins/org.eclipse.jet/antsrc/org/eclipse/jet/ant/tasks/JETTransformTask.java
index 3253ce5..048003d 100644
--- a/plugins/org.eclipse.jet/antsrc/org/eclipse/jet/ant/tasks/JETTransformTask.java
+++ b/plugins/org.eclipse.jet/antsrc/org/eclipse/jet/ant/tasks/JETTransformTask.java
@@ -28,6 +28,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jet.JET2Platform;
+import org.eclipse.jet.internal.l10n.JET2Messages;
/**
* Implement an ANT Task to run a JET transform.
@@ -67,6 +68,9 @@ public class JETTransformTask extends Task {
if(transformId == null) {
throw new BuildException(MessageFormat.format(missingAttrMsg, new Object[] {"transformId"})); //$NON-NLS-1$
}
+ if(JET2Platform.getJETBundleManager().getDescriptor(transformId) == null) {
+ throw new BuildException(MessageFormat.format(JET2Messages.JET2Platform_TransformNotFound, new Object[] {transformId}));
+ }
if(source == null) {
throw new BuildException(MessageFormat.format(missingAttrMsg, new Object[] {"source"})); //$NON-NLS-1$
}
@@ -83,7 +87,7 @@ public class JETTransformTask extends Task {
monitor = new NullProgressMonitor();
}
- log("Running \"" + transformId + "\" on resource \"" + resource.toString() + "\".");
+ log("Running \"" + transformId + "\" on resource \"" + resource.getFullPath().toString() + "\".");
final IStatus result = JET2Platform.runTransformOnResource(transformId, resource, monitor);
if(!result.isOK()) {