blob: d0b7443cdb2ff8b06b78cf9a28417f474d7bebd8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
package org.openoffice.ide.eclipse.java;
import org.openoffice.ide.eclipse.core.model.config.IExtraOptionsProvider;
import org.openoffice.ide.eclipse.core.model.utils.SystemHelper;
/**
* Adds extra env variables to start OpenOffice with Java setup to run in debug mode.
*
* @author cdan
*
*/
public class JavaDebugExtraOptionsProvider implements IExtraOptionsProvider {
private String mPort;
/**
*
* @param pPort
* the port to listen to.
*/
public JavaDebugExtraOptionsProvider(String pPort) {
this.mPort = pPort;
}
/**
* {@inheritDoc}
*/
public String[] addEnv(String[] pEnv) {
pEnv = SystemHelper.addEnv(pEnv, "JAVA_TOOL_OPTIONS", "\"-Xdebug\" "
+ "\"-Xrunjdwp:transport=dt_socket,address=localhost:" + mPort + "\"", null);
return pEnv;
}
}
|