org.radrails.rails.core
Class RailsRuntime

java.lang.Object
  extended byorg.radrails.rails.core.RailsRuntime

public class RailsRuntime
extends java.lang.Object

Handles the runtime for the Rails plugins.

Version:
0.3.1
Author:
kyle

Constructor Summary
RailsRuntime()
           
 
Method Summary
static int runCommand(java.io.File location, java.util.List args, org.eclipse.core.runtime.IProgressMonitor monitor)
          Runs the specified commands in the specified location using the specified progress monitor.
static int runGenerateCommand(java.io.File project, java.util.List args, org.eclipse.core.runtime.IProgressMonitor monitor)
          Runs the generate command.
static int runRailsCommand(java.io.File projectLocation, java.util.List args, org.eclipse.core.runtime.IProgressMonitor monitor)
          Runs the "rails" program with the specified arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RailsRuntime

public RailsRuntime()
Method Detail

runCommand

public static int runCommand(java.io.File location,
                             java.util.List args,
                             org.eclipse.core.runtime.IProgressMonitor monitor)
Runs the specified commands in the specified location using the specified progress monitor. To be specific.

Parameters:
location - The location to run the command in
args - The commands to run, the first in the list being the program to execute, followed by its arguments.
monitor - The progress monitor to monitor the progress of the program's execution.
Returns:
An int value for its execution exit error code.

runRailsCommand

public static int runRailsCommand(java.io.File projectLocation,
                                  java.util.List args,
                                  org.eclipse.core.runtime.IProgressMonitor monitor)
Runs the "rails" program with the specified arguments.

Parameters:
args - The arguments to pass into the rails command.
monitor - The progress monitor to use.
Returns:
The exit value after the program has finished execution.

runGenerateCommand

public static int runGenerateCommand(java.io.File project,
                                     java.util.List args,
                                     org.eclipse.core.runtime.IProgressMonitor monitor)
Runs the generate command.

Parameters:
project - The location to the project to run the command.
args - The command line arguments to add to the generate command.
monitor - The progress monitor to use.
Returns:
The exit status code after the execution of the command.