Class Main
java.lang.Object
com.diffplug.gradle.eclipserunner.launcher.Main
Copied on 2021-02-11 straight from https://github.com/eclipse/rt.equinox.framework/blob/7433233fbcf44fe8b82e63a10f8733767e5b3042/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java
- then make `void basicRun(String[] args)` into `public`
- `Thread splashHandler` into `protected`
- `void invokeFramework(` into `protected`
- make the following `public`
- `String PARENT_CLASSLOADER_EXT`
- `String PARENT_CLASSLOADER_BOOT`
- `String PROP_PARENT_CLASSLOADER`
- `String PROP_FRAMEWORK_PARENT_CLASSLOADER`
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected StringThe location of the launcher to run.protected URLThe location of the configuration information for this instanceprotected booleanIndicates whether this instance is running in debug mode.protected StringThe extra development time class path entries for the framework.protected static final Stringprotected static final intprotected StringThe id of the bundle that will contain the framework to run.protected booleanIndicates whether this instance is running in development mode.protected URLThe location of the install rootprotected static final Stringprotected BufferedWriterprotected Fileprotected static final Stringprotected booleanprotected StringIndicates which OS was passed in with -osstatic final Stringstatic final Stringprotected StringThe location of the configuration information in the install rootprotected static final Stringprotected static final Stringstatic final Stringstatic final Stringprotected static final Stringprotected static final Stringstatic final Stringstatic final Stringprotected booleanprotected final Threadprotected static final Stringstatic final charstatic final Stringprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidExecutes the launch.protected voidprotected StringReturns a string representation of the given URL String.protected intprotected String[]getArrayFromList(String prop) Returns the result of converting a list of comma-separated tokens into an arrayprotected Stringprotected voidinvokeFramework(String[] passThruArgs, URL[] bootPath) protected voidstatic voidRuns this launcher with the arguments specified in the given string.static voidRuns the platform with the given arguments.protected String[]processCommandLine(String[] args) Processes the command line arguments.intRuns the platform with the given arguments.protected StringSearches for the given target directory starting in the "plugins" subdirectory of the given location.protected voidsetSecurityPolicy(URL[] bootPath) static StringsubstituteVars(String path) protected void
-
Field Details
-
debug
protected boolean debugIndicates whether this instance is running in debug mode. -
bootLocation
The location of the launcher to run. -
installLocation
The location of the install root -
configurationLocation
The location of the configuration information for this instance -
parentConfigurationLocation
The location of the configuration information in the install root -
framework
The id of the bundle that will contain the framework to run. Defaults to org.eclipse.osgi. -
devClassPath
The extra development time class path entries for the framework. -
inDevelopmentMode
protected boolean inDevelopmentModeIndicates whether this instance is running in development mode. -
os
Indicates which OS was passed in with -os -
ws
-
arch
-
splashDown
protected boolean splashDown -
splashHandler
-
SPLASH_HANDLE
- See Also:
-
SPLASH_LOCATION
- See Also:
-
REFERENCE_SCHEME
- See Also:
-
JAR_SCHEME
- See Also:
-
PROP_FRAMEWORK
- See Also:
-
PROP_PARENT_CLASSLOADER
- See Also:
-
PROP_FRAMEWORK_PARENT_CLASSLOADER
- See Also:
-
PARENT_CLASSLOADER_EXT
- See Also:
-
PARENT_CLASSLOADER_BOOT
- See Also:
-
SESSION
- See Also:
-
ENTRY
- See Also:
-
MESSAGE
- See Also:
-
STACK
- See Also:
-
ERROR
protected static final int ERROR- See Also:
-
PLUGIN_ID
- See Also:
-
logFile
-
log
-
newSession
protected boolean newSession -
VARIABLE_DELIM_STRING
- See Also:
-
VARIABLE_DELIM_CHAR
public static final char VARIABLE_DELIM_CHAR- See Also:
-
-
Constructor Details
-
Main
public Main()
-
-
Method Details
-
basicRun
Executes the launch.- Parameters:
args- command-line arguments- Throws:
Exception- thrown if a problem occurs during the launch
-
beforeFwkInvocation
protected void beforeFwkInvocation() -
setSecurityPolicy
-
invokeFramework
protected void invokeFramework(String[] passThruArgs, URL[] bootPath) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, Error, Exception, InvocationTargetException -
decode
Returns a string representation of the given URL String. This converts escaped sequences (%..) in the URL into the appropriate characters. NOTE: due to class visibility there is a copy of this method in InternalBootLoader -
getArrayFromList
Returns the result of converting a list of comma-separated tokens into an array- Parameters:
prop- the initial comma-separated string- Returns:
- the array of string tokens
-
addEntry
-
searchFor
Searches for the given target directory starting in the "plugins" subdirectory of the given location.- Parameters:
start- the location to begin searching- Returns:
- the location where target directory was found,
nullotherwise
-
findMax
-
main
Runs this launcher with the arguments specified in the given string.- Parameters:
argString- the arguments string
-
main
Runs the platform with the given arguments. The arguments must identify an application to run (e.g.,-application com.example.application). After running the applicationSystem.exit(N)is executed. The value of N is derived from the value returned from running the application. If the application's return value is anInteger, N is this value. In all other cases, N = 0.Clients wishing to run the platform without a following
System.exitcall should userun().- Parameters:
args- the command line arguments- See Also:
-
run
Runs the platform with the given arguments. The arguments must identify an application to run (e.g.,-application com.example.application). Returns the value returned from running the application. If the application's return value is anInteger, N is this value. In all other cases, N = 0.- Parameters:
args- the command line arguments
-
processCommandLine
Processes the command line arguments. The general principle is to NOT consume the arguments and leave them to be processed by Eclipse proper. There are a few args which are directed towards main() and a few others which we need to know about. Very few should actually be consumed here.- Parameters:
args- the command line arguments- Returns:
- the arguments to pass through to the launched application
-
takeDownSplash
protected void takeDownSplash() -
log
-
getDate
-
substituteVars
-