Class EclipseIni
- java.lang.Object
-
- com.diffplug.gradle.eclipserunner.EclipseIni
-
public class EclipseIni extends Object
Api for manipulating eclipse.ini, see [Eclipse docs](https://wiki.eclipse.org/Eclipse.ini) for more details.
-
-
Constructor Summary
Constructors Constructor Description EclipseIni()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAfter(String input)Returns the line after the given line, and ensures that the returned value does not start with a dash.String[]getLinesAsArray()Returns all lines as an array.static EclipseIniparseFrom(File file)Parses an eclipse.ini from the given file.voidset(String key, File file)Sets the given property to a file.voidset(String key, String value)Sets a property, replacing its existing value or inserting just before vmargs.voidvmargs(String... vmargs)Sets the vmargs arguments, such as `-Xmx2g` to set the maximum heap size.voidvmargs(Collection<String> vmargs)Sets the vmargs arguments, such as `-Xmx2g` to set the maximum heap size.voidwriteTo(File file)Writes this eclipse.ini out to a file.
-
-
-
Method Detail
-
parseFrom
public static EclipseIni parseFrom(File file) throws FileNotFoundException, IOException
Parses an eclipse.ini from the given file.- Throws:
FileNotFoundExceptionIOException
-
writeTo
public void writeTo(File file) throws FileNotFoundException
Writes this eclipse.ini out to a file.- Throws:
FileNotFoundException
-
getAfter
public String getAfter(String input)
Returns the line after the given line, and ensures that the returned value does not start with a dash.
-
getLinesAsArray
public String[] getLinesAsArray()
Returns all lines as an array.
-
set
public void set(String key, String value)
Sets a property, replacing its existing value or inserting just before vmargs.
-
vmargs
public void vmargs(String... vmargs)
Sets the vmargs arguments, such as `-Xmx2g` to set the maximum heap size.
-
vmargs
public void vmargs(Collection<String> vmargs)
Sets the vmargs arguments, such as `-Xmx2g` to set the maximum heap size.
-
-