Disallow an unordered collection from being used as an argument list
This commit is contained in:
parent
c721ce704f
commit
4913476d25
2 changed files with 5 additions and 6 deletions
|
@ -5,7 +5,6 @@ import java.io.InputStream;
|
|||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.swt.widgets.MessageBox;
|
||||
|
@ -30,7 +29,7 @@ public class ExternalToolInvoker {
|
|||
* @param useThread true if the process will run in a thread
|
||||
* @throws IOException
|
||||
*/
|
||||
public ExternalToolInvoker(String fileName, Collection<String> arguments, boolean useThread) throws IOException
|
||||
public ExternalToolInvoker(String fileName, List<String> arguments, boolean useThread) throws IOException
|
||||
{
|
||||
List<String> commandline = new ArrayList<String>();
|
||||
commandline.add(fileName);
|
||||
|
@ -156,7 +155,7 @@ public class ExternalToolInvoker {
|
|||
* (if null no messages will be triggered)
|
||||
* @return
|
||||
*/
|
||||
public static boolean launchTool(final String fileName,final Collection<String> args,final boolean showOutput,
|
||||
public static boolean launchTool(final String fileName,final List<String> args,final boolean showOutput,
|
||||
final boolean waitFor,final boolean useThread,final IWorkbenchWindow workbenchWindow)
|
||||
{
|
||||
// we need a new thread so we won't block the caller
|
||||
|
|
|
@ -2,7 +2,7 @@ package wesnoth_eclipse_plugin.handlers;
|
|||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.core.commands.AbstractHandler;
|
||||
import org.eclipse.core.commands.ExecutionEvent;
|
||||
|
@ -41,9 +41,9 @@ public class OpenEditorHandler extends AbstractHandler
|
|||
return null;
|
||||
}
|
||||
|
||||
public static Collection<String> getLaunchEditorArguments(String mapName, String workingDir)
|
||||
public static List<String> getLaunchEditorArguments(String mapName, String workingDir)
|
||||
{
|
||||
Collection<String> args = new ArrayList<String>(3);
|
||||
List<String> args = new ArrayList<String>(3);
|
||||
|
||||
args.add("-e");
|
||||
args.add(mapName);
|
||||
|
|
Loading…
Add table
Reference in a new issue