public class CompilerHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ERROR_FILE_EXTENSION
Error file extension "rexxerr", without the '.' dot.
|
static String |
NETREXX_FILE_EXTENSION
NetRexx file extension "nrx", without the '.' dot.
|
static String |
REXX_FILE_EXTENSION
REXX file extension "rexx", without the '.' dot.
|
Constructor and Description |
---|
CompilerHelper() |
Modifier and Type | Method and Description |
---|---|
static int |
compileNetRexx(Collection<REXXSource> sources,
Collection<REXXSource> javaSources,
IFeedBack monitor)
Compile one or more NetRexx sources to Java sources.
|
static int |
compileREXX(Collection<REXXSource> sources,
boolean doRemoveSayTrace,
Collection<REXXSource> success,
IFeedBack monitor)
Compiles a codepage-converted REXX source to NetRexx.
|
static boolean |
compileREXX(File source,
boolean doRemoveSay,
String[] result)
Compiles a REXX source to NetRexx for the Eclipse plug-in.
|
static String |
getName(String fileName,
String newExtension)
Gets the name of a file, replacing the file extension with the new extension, the base of
the file name in upper case.
|
static boolean |
isProgramRunning(String exe)
Checks if a program is running.
|
static void |
setup(File[] files)
Sets up the compile environment for Eclipse.
|
public static final String REXX_FILE_EXTENSION
public static final String NETREXX_FILE_EXTENSION
public static final String ERROR_FILE_EXTENSION
public static void setup(File[] files)
files
- The resolved array of files:
File Index ---------------------------- ----- r2nrNT.exe 0 rules 1 footer.nrx 2 java.exe 3 (Java JRE 8) NetRexxR.jar 4 NetRexxC.jar 5 NetPhantomServer.jar 6 (or Server\bin for debug) Common\bin (debug only) 7 Plaf\bin (debug only) 8
public static boolean isProgramRunning(String exe)
public static String getName(String fileName, String newExtension)
fileName
- The file name.newExtension
- The new file extension.public static boolean compileREXX(File source, boolean doRemoveSay, String[] result) throws IOException
source
- The REXX source to compile.doRemoveSay
- Flag to remove Say and Trace statements.result
- The resource is placed in result[0], commands etc in result[1].IOException
- For I/O errors.public static int compileREXX(Collection<REXXSource> sources, boolean doRemoveSayTrace, Collection<REXXSource> success, IFeedBack monitor) throws IOException
sources
- The REXX sources to codepage convert.doRemoveSayTrace
- Flag to remove Say and Trace statements.success
- Collection of successfully compiled sources.monitor
- Feedback interface.IOException
- For I/O errors. StreamReaderThreadpublic static int compileNetRexx(Collection<REXXSource> sources, Collection<REXXSource> javaSources, IFeedBack monitor) throws IOException
sources
- REXX sources.javaSources
- Java sources requiring compile, updated by this method by adding new instances, or null for no information about Java files.monitor
- Feed-back interface, if null error file is in memory for Eclipse.IOException
- For I/O errors or if compiler is not loaded.Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.