summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkthoms2009-07-29 11:01:00 (EDT)
committer kthoms2009-07-29 11:01:00 (EDT)
commitccd870875a193c347fa7bcf160b416e278f72e05 (patch)
tree074d8f81639b1e25185d2c649999f10c32ca7d65
parent738cb0bbe66e66876bebb4a1ffa0c805bb7a1c8e (diff)
downloadorg.eclipse.mwe-ccd870875a193c347fa7bcf160b416e278f72e05.zip
org.eclipse.mwe-ccd870875a193c347fa7bcf160b416e278f72e05.tar.gz
org.eclipse.mwe-ccd870875a193c347fa7bcf160b416e278f72e05.tar.bz2
Fixed Bug#285011
added FileConverter
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/ast/util/WorkflowFactory.java3
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/ast/util/converter/FileConverter.java21
2 files changed, 24 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/ast/util/WorkflowFactory.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/ast/util/WorkflowFactory.java
index 6ab396d..9ea7a56 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/ast/util/WorkflowFactory.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/ast/util/WorkflowFactory.java
@@ -11,6 +11,7 @@
package org.eclipse.emf.mwe.internal.core.ast.util;
+import java.io.File;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
@@ -26,6 +27,7 @@ import org.eclipse.emf.mwe.internal.core.ast.SimpleParamAST;
import org.eclipse.emf.mwe.internal.core.ast.parser.WorkflowParser;
import org.eclipse.emf.mwe.internal.core.ast.util.converter.BooleanConverter;
import org.eclipse.emf.mwe.internal.core.ast.util.converter.Converter;
+import org.eclipse.emf.mwe.internal.core.ast.util.converter.FileConverter;
import org.eclipse.emf.mwe.internal.core.ast.util.converter.IntegerConverter;
import org.eclipse.emf.mwe.internal.core.ast.util.converter.StringArrayConverter;
import org.eclipse.emf.mwe.internal.core.ast.util.converter.StringConverter;
@@ -128,6 +130,7 @@ public class WorkflowFactory {
m.put(Integer.class, new IntegerConverter());
m.put(Integer.TYPE, new IntegerConverter());
m.put(String[].class, new StringArrayConverter());
+ m.put(File.class, new FileConverter());
return m;
}
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/ast/util/converter/FileConverter.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/ast/util/converter/FileConverter.java
new file mode 100644
index 0000000..8418bfe
--- /dev/null
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/ast/util/converter/FileConverter.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2005-2008 committers of openArchitectureWare and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * committers of openArchitectureWare - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.mwe.internal.core.ast.util.converter;
+
+import java.io.File;
+
+public class FileConverter implements Converter<File> {
+
+ public File convert(String s) {
+ return new File(s);
+ }
+
+}