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 String
getAfter(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 EclipseIni
parseFrom(File file)
Parses an eclipse.ini from the given file.void
set(String key, File file)
Sets the given property to a file.void
set(String key, String value)
Sets a property, replacing its existing value or inserting just before vmargs.void
vmargs(String... vmargs)
Sets the vmargs arguments, such as `-Xmx2g` to set the maximum heap size.void
vmargs(Collection<String> vmargs)
Sets the vmargs arguments, such as `-Xmx2g` to set the maximum heap size.void
writeTo(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:
FileNotFoundException
IOException
-
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.
-
-