summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelder2006-04-27 09:09:53 (EDT)
committer pelder2006-04-27 09:09:53 (EDT)
commitc481499db6acc2ccdf15fda57456cf7b964d90c0 (patch)
treec306cf04f61f8e6668013ec782f7926c5378485c
parent3b14ba73635803799691e07801bb06710af6ea23 (diff)
downloadorg.eclipse.jet-c481499db6acc2ccdf15fda57456cf7b964d90c0.zip
org.eclipse.jet-c481499db6acc2ccdf15fda57456cf7b964d90c0.tar.gz
org.eclipse.jet-c481499db6acc2ccdf15fda57456cf7b964d90c0.tar.bz2
[138901] Check for invalid transform id, and issue error message.
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/launch/JETProcess.java24
1 files changed, 16 insertions, 8 deletions
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/launch/JETProcess.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/launch/JETProcess.java
index 3ee2521..f13a073 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/launch/JETProcess.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/launch/JETProcess.java
@@ -18,6 +18,7 @@ package org.eclipse.jet.internal.launch;
import java.io.IOException;
import java.text.DateFormat;
+import java.text.MessageFormat;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;
@@ -35,6 +36,7 @@ import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.jet.CoreJETException;
import org.eclipse.jet.JET2Context;
import org.eclipse.jet.JET2Platform;
+import org.eclipse.jet.internal.l10n.JET2Messages;
import org.eclipse.jet.taglib.workspace.WorkspaceContextExtender;
import org.eclipse.jet.transform.IJETBundleDescriptor;
@@ -146,14 +148,20 @@ public class JETProcess extends PlatformObject implements IProcess
try
{
final IJETBundleDescriptor descriptor = JET2Platform.getJETBundleManager().getDescriptor(id);
-
- String loaderId = descriptor.getModelLoaderId();
- String fileType = descriptor.getModelExtension();
-
- WorkspaceContextExtender.loadResourceAsSource(context, resource, loaderId, fileType);
-
- status = JET2Platform.runTransform(id, context, monitor);
- context.logInfo(status.getMessage());
+ if(descriptor != null)
+ {
+ String loaderId = descriptor.getModelLoaderId();
+ String fileType = descriptor.getModelExtension();
+
+ WorkspaceContextExtender.loadResourceAsSource(context, resource, loaderId, fileType);
+
+ status = JET2Platform.runTransform(id, context, monitor);
+ context.logInfo(status.getMessage());
+ }
+ else
+ {
+ context.logError(MessageFormat.format(JET2Messages.JET2Platform_TransformNotFound, new Object[] {id}));
+ }
}
catch (IOException e)
{