[Esbox-commits] r185 - in trunk/org.indt.esbox.launch/src/org/indt/esbox/launch: local remote
raul at garage.maemo.org
raul at garage.maemo.org
Fri Oct 26 15:17:00 EEST 2007
Author: raul
Date: 2007-10-26 15:17:00 +0300 (Fri, 26 Oct 2007)
New Revision: 185
Modified:
trunk/org.indt.esbox.launch/src/org/indt/esbox/launch/local/ESboxLocalRunLaunchConfigurationTabGroup.java
trunk/org.indt.esbox.launch/src/org/indt/esbox/launch/local/ESboxLocalRunLaunchDelegate.java
trunk/org.indt.esbox.launch/src/org/indt/esbox/launch/remote/ESboxRemoteRunLaunchConfigurationTabGroup.java
trunk/org.indt.esbox.launch/src/org/indt/esbox/launch/remote/ESboxRemoteRunLaunchDelegate.java
Log:
some modifications to add new configure tab
Modified: trunk/org.indt.esbox.launch/src/org/indt/esbox/launch/local/ESboxLocalRunLaunchConfigurationTabGroup.java
===================================================================
--- trunk/org.indt.esbox.launch/src/org/indt/esbox/launch/local/ESboxLocalRunLaunchConfigurationTabGroup.java 2007-10-26 12:14:02 UTC (rev 184)
+++ trunk/org.indt.esbox.launch/src/org/indt/esbox/launch/local/ESboxLocalRunLaunchConfigurationTabGroup.java 2007-10-26 12:17:00 UTC (rev 185)
@@ -19,6 +19,7 @@
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
import org.eclipse.debug.ui.ILaunchConfigurationTab;
import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
+import org.indt.esbox.launch.internal.ui.ESboxCMainTab;
/**
*
@@ -31,7 +32,7 @@
*/
public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
- new CMainTab(true),
+ new ESboxCMainTab(),
new CArgumentsTab(),
new EnvironmentTab(),
new CDebuggerTab(false),
Modified: trunk/org.indt.esbox.launch/src/org/indt/esbox/launch/local/ESboxLocalRunLaunchDelegate.java
===================================================================
--- trunk/org.indt.esbox.launch/src/org/indt/esbox/launch/local/ESboxLocalRunLaunchDelegate.java 2007-10-26 12:14:02 UTC (rev 184)
+++ trunk/org.indt.esbox.launch/src/org/indt/esbox/launch/local/ESboxLocalRunLaunchDelegate.java 2007-10-26 12:17:00 UTC (rev 185)
@@ -52,6 +52,8 @@
import org.indt.esbox.core.scratchbox.ScratchboxException;
import org.indt.esbox.core.scratchbox.ScratchboxFacade;
import org.indt.esbox.launch.LaunchActivator;
+import org.indt.esbox.launch.internal.IESboxCDTLaunchConfigurationConstants;
+import org.indt.esbox.launch.internal.ui.ESboxCMainTab;
/**
*
@@ -87,6 +89,9 @@
try {
monitor.worked(1);
+
+ boolean isRunStandalone = config.getAttribute(IESboxCDTLaunchConfigurationConstants.ATTR_RUN_STANDALONE, IESboxCDTLaunchConfigurationConstants.RUN_STANDALONE_DEFAULT);
+
IPath exePath = verifyProgramPath(config);
ICProject project = verifyCProject(config);
IBinaryObject exeFile = verifyBinary(project, exePath);
@@ -100,7 +105,7 @@
// The launcher for running commands inside the Scratchbox
// environment
- ScratchboxCommandLauncher launcher = new InnerCommandLauncher();
+ InnerCommandLauncher launcher = new InnerCommandLauncher();
File wd = getWorkingDirectory(config);
if (wd == null) {
wd = new File(System.getProperty("user.home", ".")); //$NON-NLS-1$ //$NON-NLS-2$
@@ -173,11 +178,11 @@
}
env = (String[]) envList.toArray(new String[envList.size()]);
}
-
+
Process process;
// if standalone is disabled run commands normally
process = launcher.execute(exePath, arguments,
- env, new Path(wd.getAbsolutePath()));
+ env, new Path(wd.getAbsolutePath()), isRunStandalone);
monitor.worked(3);
DebugPlugin.newProcess(launch, process,
@@ -231,9 +236,10 @@
* (non-Javadoc)
* @see org.eclipse.cdt.core.CommandLauncher#execute(org.eclipse.core.runtime.IPath, java.lang.String[], java.lang.String[], org.eclipse.core.runtime.IPath)
*/
- public Process execute(IPath commandPath, String[] args, String[] env, IPath changeToDirectory) {
+ public Process execute(IPath commandPath, String[] args, String[] env, IPath changeToDirectory, boolean isRunStandalone) {
try {
- String command = "run-standalone.sh " + commandPath.toOSString();
+ String command = isRunStandalone ? "run-standalone.sh " : "";
+ command += commandPath.toOSString();
fCommandArgs = constructCommandArray(command,args, env, changeToDirectory);
PTY pty = new PTY();
Modified: trunk/org.indt.esbox.launch/src/org/indt/esbox/launch/remote/ESboxRemoteRunLaunchConfigurationTabGroup.java
===================================================================
--- trunk/org.indt.esbox.launch/src/org/indt/esbox/launch/remote/ESboxRemoteRunLaunchConfigurationTabGroup.java 2007-10-26 12:14:02 UTC (rev 184)
+++ trunk/org.indt.esbox.launch/src/org/indt/esbox/launch/remote/ESboxRemoteRunLaunchConfigurationTabGroup.java 2007-10-26 12:17:00 UTC (rev 185)
@@ -19,6 +19,7 @@
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
import org.eclipse.debug.ui.ILaunchConfigurationTab;
import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
+import org.indt.esbox.launch.internal.ui.ESboxCMainTab;
/**
*
@@ -31,7 +32,7 @@
*/
public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
- new CMainTab(true),
+ new ESboxCMainTab(),
new CArgumentsTab(),
new EnvironmentTab(),
new CDebuggerTab(false),
Modified: trunk/org.indt.esbox.launch/src/org/indt/esbox/launch/remote/ESboxRemoteRunLaunchDelegate.java
===================================================================
--- trunk/org.indt.esbox.launch/src/org/indt/esbox/launch/remote/ESboxRemoteRunLaunchDelegate.java 2007-10-26 12:14:02 UTC (rev 184)
+++ trunk/org.indt.esbox.launch/src/org/indt/esbox/launch/remote/ESboxRemoteRunLaunchDelegate.java 2007-10-26 12:17:00 UTC (rev 185)
@@ -47,6 +47,8 @@
import org.indt.esbox.core.scratchbox.ScratchboxException;
import org.indt.esbox.core.scratchbox.ScratchboxFacade;
import org.indt.esbox.launch.LaunchActivator;
+import org.indt.esbox.launch.internal.IESboxCDTLaunchConfigurationConstants;
+import org.indt.esbox.launch.internal.ui.ESboxCMainTab;
/**
*
@@ -73,6 +75,9 @@
}
try {
monitor.worked(1);
+
+ boolean isRunStandalone = config.getAttribute(IESboxCDTLaunchConfigurationConstants.ATTR_RUN_STANDALONE, IESboxCDTLaunchConfigurationConstants.RUN_STANDALONE_DEFAULT);
+
IPath exePath = verifyProgramPath(config);
ICProject project = verifyCProject(config);
IBinaryObject exeFile = verifyBinary(project, exePath);
@@ -85,7 +90,7 @@
// The launcher for running commands inside the Scratchbox
// environment
- ScratchboxCommandLauncher launcher = new InnerCommandLauncher();
+ InnerCommandLauncher launcher = new InnerCommandLauncher();
File wd = getWorkingDirectory(config);
if (wd == null) {
wd = new File(System.getProperty("user.home", ".")); //$NON-NLS-1$ //$NON-NLS-2$
@@ -176,7 +181,7 @@
Process process;
// if standalone is disabled run commands normally
process = launcher.execute(exePath, arguments,
- env, new Path(wd.getAbsolutePath()));
+ env, new Path(wd.getAbsolutePath()), isRunStandalone);
monitor.worked(3);
DebugPlugin.newProcess(launch, process,
@@ -223,9 +228,10 @@
* (non-Javadoc)
* @see org.eclipse.cdt.core.CommandLauncher#execute(org.eclipse.core.runtime.IPath, java.lang.String[], java.lang.String[], org.eclipse.core.runtime.IPath)
*/
- public Process execute(IPath commandPath, String[] args, String[] env, IPath changeToDirectory) {
+ public Process execute(IPath commandPath, String[] args, String[] env, IPath changeToDirectory, boolean isRunStandalone) {
try {
- String command = "run-standalone.sh " + commandPath.toOSString();
+ String command = isRunStandalone ? "run-standalone.sh " : "";
+ command += commandPath.toOSString();
fCommandArgs = constructCommandArray(command,args, env, changeToDirectory);
// exec command
More information about the Esbox-commits
mailing list