aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2012-06-11 03:33:18 (EDT)
committerUwe Stieber2012-06-11 03:33:18 (EDT)
commit0347c4674688f90fe1ca5d56c6fd5cc376676d5a (patch)
tree363dc5204d7e3f285d5e21e8749974ad1ea93ad8
parentb99636e01f67abb516315ad4c743bd0f39f922d4 (diff)
downloadorg.eclipse.tcf-0347c4674688f90fe1ca5d56c6fd5cc376676d5a.zip
org.eclipse.tcf-0347c4674688f90fe1ca5d56c6fd5cc376676d5a.tar.gz
org.eclipse.tcf-0347c4674688f90fe1ca5d56c6fd5cc376676d5a.tar.bz2
Target Explorer: ADD unit tests
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF95
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/data/helloWorld/linux/x86_64/HelloWorldbin0 -> 33190 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/data/helloWorld/win32/x86/HelloWorld.exebin0 -> 8192 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/data/helloWorld/win32/x86_64/HelloWorld.exebin0 -> 8192 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/StepperTests.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/StepperTestCase.java)47
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/TestStep.java3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/suites/AllTests.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/launch/TcfLaunchTests.java117
8 files changed, 219 insertions, 49 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF
index b3f50d5..ecc8e80 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF
@@ -1,45 +1,50 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tcf.te.tests;singleton:=true
-Bundle-Version: 1.1.0.qualifier
-Bundle-Activator: org.eclipse.tcf.te.tests.activator.UIPlugin
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
- org.eclipse.core.expressions;bundle-version="3.4.400",
- org.eclipse.ui;bundle-version="3.8.0",
- org.junit;bundle-version="4.10.0",
- org.eclipse.tcf.core;bundle-version="1.1.0",
- org.eclipse.tcf.te.core;bundle-version="1.1.0",
- org.eclipse.tcf.te.runtime;bundle-version="1.1.0",
- org.eclipse.tcf.te.runtime.model;bundle-version="1.1.0",
- org.eclipse.tcf.te.runtime.statushandler;bundle-version="1.1.0",
- org.eclipse.tcf.te.runtime.stepper;bundle-version="1.1.0",
- org.eclipse.tcf.te.tcf.core;bundle-version="1.1.0",
- org.eclipse.tcf.te.tcf.filesystem.core;bundle-version="1.1.0",
- org.eclipse.tcf.te.tcf.filesystem.ui;bundle-version="1.1.0",
- org.eclipse.tcf.te.tcf.locator;bundle-version="1.1.0",
- org.eclipse.tcf.te.tcf.processes.ui;bundle-version="1.1.0",
- org.eclipse.tcf.te.ui;bundle-version="1.1.0",
- org.eclipse.tcf.te.ui.views;bundle-version="1.1.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tcf.te.tests,
- org.eclipse.tcf.te.tests.activator;x-internal:=true,
- org.eclipse.tcf.te.tests.interfaces,
- org.eclipse.tcf.te.tests.statushandler,
- org.eclipse.tcf.te.tests.stepper,
- org.eclipse.tcf.te.tests.suites,
- org.eclipse.tcf.te.tests.tcf,
- org.eclipse.tcf.te.tests.tcf.filesystem,
- org.eclipse.tcf.te.tests.tcf.filesystem.adapters,
- org.eclipse.tcf.te.tests.tcf.filesystem.callbacks,
- org.eclipse.tcf.te.tests.tcf.filesystem.controls,
- org.eclipse.tcf.te.tests.tcf.filesystem.dnd,
- org.eclipse.tcf.te.tests.tcf.filesystem.filters,
- org.eclipse.tcf.te.tests.tcf.filesystem.operations,
- org.eclipse.tcf.te.tests.tcf.filesystem.testers,
- org.eclipse.tcf.te.tests.tcf.filesystem.url,
- org.eclipse.tcf.te.tests.tcf.filesystem.utils,
- org.eclipse.tcf.te.tests.tcf.tests
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tests;singleton:=true
+Bundle-Version: 1.1.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tests.activator.UIPlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
+ org.eclipse.core.expressions;bundle-version="3.4.400",
+ org.eclipse.ui;bundle-version="3.8.0",
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.tcf.core;bundle-version="1.1.0",
+ org.eclipse.tcf.te.core;bundle-version="1.1.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.1.0",
+ org.eclipse.tcf.te.runtime.model;bundle-version="1.1.0",
+ org.eclipse.tcf.te.runtime.statushandler;bundle-version="1.1.0",
+ org.eclipse.tcf.te.runtime.stepper;bundle-version="1.1.0",
+ org.eclipse.tcf.te.tcf.core;bundle-version="1.1.0",
+ org.eclipse.tcf.te.tcf.filesystem.core;bundle-version="1.1.0",
+ org.eclipse.tcf.te.tcf.filesystem.ui;bundle-version="1.1.0",
+ org.eclipse.tcf.te.tcf.locator;bundle-version="1.1.0",
+ org.eclipse.tcf.te.tcf.processes.ui;bundle-version="1.1.0",
+ org.eclipse.tcf.te.ui;bundle-version="1.1.0",
+ org.eclipse.tcf.te.ui.views;bundle-version="1.1.0",
+ org.eclipse.tcf.te.runtime.services;bundle-version="1.1.0",
+ org.eclipse.tcf.te.launch.core;bundle-version="1.1.0",
+ org.eclipse.tcf.te.tcf.launch.core;bundle-version="1.1.0",
+ org.eclipse.debug.core;bundle-version="3.7.100",
+ org.eclipse.tcf.te.runtime.concurrent;bundle-version="1.1.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.tests,
+ org.eclipse.tcf.te.tests.activator;x-internal:=true,
+ org.eclipse.tcf.te.tests.interfaces,
+ org.eclipse.tcf.te.tests.statushandler,
+ org.eclipse.tcf.te.tests.stepper,
+ org.eclipse.tcf.te.tests.suites,
+ org.eclipse.tcf.te.tests.tcf,
+ org.eclipse.tcf.te.tests.tcf.filesystem,
+ org.eclipse.tcf.te.tests.tcf.filesystem.adapters,
+ org.eclipse.tcf.te.tests.tcf.filesystem.callbacks,
+ org.eclipse.tcf.te.tests.tcf.filesystem.controls,
+ org.eclipse.tcf.te.tests.tcf.filesystem.dnd,
+ org.eclipse.tcf.te.tests.tcf.filesystem.filters,
+ org.eclipse.tcf.te.tests.tcf.filesystem.operations,
+ org.eclipse.tcf.te.tests.tcf.filesystem.testers,
+ org.eclipse.tcf.te.tests.tcf.filesystem.url,
+ org.eclipse.tcf.te.tests.tcf.filesystem.utils,
+ org.eclipse.tcf.te.tests.tcf.tests
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/data/helloWorld/linux/x86_64/HelloWorld b/target_explorer/plugins/org.eclipse.tcf.te.tests/data/helloWorld/linux/x86_64/HelloWorld
new file mode 100644
index 0000000..5f6f20d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/data/helloWorld/linux/x86_64/HelloWorld
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/data/helloWorld/win32/x86/HelloWorld.exe b/target_explorer/plugins/org.eclipse.tcf.te.tests/data/helloWorld/win32/x86/HelloWorld.exe
new file mode 100644
index 0000000..607dba8
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/data/helloWorld/win32/x86/HelloWorld.exe
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/data/helloWorld/win32/x86_64/HelloWorld.exe b/target_explorer/plugins/org.eclipse.tcf.te.tests/data/helloWorld/win32/x86_64/HelloWorld.exe
new file mode 100644
index 0000000..607dba8
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/data/helloWorld/win32/x86_64/HelloWorld.exe
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/StepperTestCase.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/StepperTests.java
index e4419a8..1cae1a0 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/StepperTestCase.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/StepperTests.java
@@ -15,18 +15,26 @@ import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.tcf.te.runtime.concurrent.util.ExecutorsUtil;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.stepper.FullQualifiedId;
import org.eclipse.tcf.te.runtime.stepper.StepperManager;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
import org.eclipse.tcf.te.runtime.stepper.interfaces.IStep;
import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext;
import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepGroup;
import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepGroupable;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepper;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepperProperties;
+import org.eclipse.tcf.te.runtime.stepper.stepper.Stepper;
import org.eclipse.tcf.te.tests.CoreTestCase;
/**
* Stepper engine test cases.
*/
-public class StepperTestCase extends CoreTestCase {
+public class StepperTests extends CoreTestCase {
protected static class TestStepContext implements IStepContext {
@@ -67,7 +75,7 @@ public class StepperTestCase extends CoreTestCase {
TestSuite testSuite = new TestSuite("Test stepper engine"); //$NON-NLS-1$
// add ourself to the test suite
- testSuite.addTestSuite(StepperTestCase.class);
+ testSuite.addTestSuite(StepperTests.class);
return testSuite;
}
@@ -265,4 +273,39 @@ public class StepperTestCase extends CoreTestCase {
assertEquals("Unexpected number of test step groups found.", 4, testStepGroupCount); //$NON-NLS-1$
}
+
+ public void testExecuteStepGroup() {
+ final IStepper stepper = new Stepper();
+
+ IPropertiesContainer properties = new PropertiesContainer();
+ properties.setProperty(IStepperProperties.PROP_NAME, "testExecuteStepGroup"); //$NON-NLS-1$
+ properties.setProperty(IStepperProperties.PROP_STEP_GROUP_ID, "org.eclipse.tcf.te.tests.stepper.stepGroup4"); //$NON-NLS-1$
+
+ // Initialize the stepper
+ IStepContext context = new TestStepContext();
+ IFullQualifiedId fullQualifiedId = new FullQualifiedId(IStepper.ID_TYPE_STEPPER_ID, stepper.getId(), null);
+ stepper.initialize(context, properties, fullQualifiedId, new NullProgressMonitor());
+
+ ExecutorsUtil.execute(new Runnable() {
+ @Override
+ public void run() {
+ // Execute
+ try {
+ stepper.execute();
+ }
+ catch (Exception e) {
+ assertNull("Unexpected exception when executing step group", e); //$NON-NLS-1$
+ }
+ }
+ });
+
+ // Wait for the stepper to be finished
+ assertFalse("Timeout executing step group", ExecutorsUtil.waitAndExecute(10000, new IStepper.ExecutionFinishedConditionTester(stepper))); //$NON-NLS-1$
+
+ assertNotNull("Missing executed step 1", properties.getProperty("org.eclipse.tcf.te.tests.stepper.step1")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertNotNull("Missing executed step 2", properties.getProperty("org.eclipse.tcf.te.tests.stepper.step2")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertNotNull("Missing executed step 3", properties.getProperty("org.eclipse.tcf.te.tests.stepper.step3")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertNotNull("Missing executed step 4", properties.getProperty("org.eclipse.tcf.te.tests.stepper.step4")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertNotNull("Missing executed step 5", properties.getProperty("org.eclipse.tcf.te.tests.stepper.step5")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/TestStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/TestStep.java
index e3aff65..9c70b1b 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/TestStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/TestStep.java
@@ -11,6 +11,7 @@ package org.eclipse.tcf.te.tests.stepper;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Status;
import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
import org.eclipse.tcf.te.runtime.stepper.extensions.AbstractStep;
@@ -34,5 +35,7 @@ public class TestStep extends AbstractStep {
*/
@Override
public void execute(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor, ICallback callback) {
+ data.setProperty(getId(), fullQualifiedId.toString());
+ callback.done(this, Status.OK_STATUS);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/suites/AllTests.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/suites/AllTests.java
index 56a84ea..a16780c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/suites/AllTests.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/suites/AllTests.java
@@ -14,7 +14,8 @@ import junit.framework.TestSuite;
import org.eclipse.core.runtime.Assert;
import org.eclipse.tcf.te.tests.statushandler.StatusHandlerTestCase;
-import org.eclipse.tcf.te.tests.stepper.StepperTestCase;
+import org.eclipse.tcf.te.tests.stepper.StepperTests;
+import org.eclipse.tcf.te.tests.tcf.launch.TcfLaunchTests;
import org.eclipse.tcf.te.tests.tcf.tests.TcfCoreTests;
/**
@@ -58,7 +59,8 @@ public class AllTests {
Assert.isNotNull(suite);
suite.addTest(StatusHandlerTestCase.getTestSuite());
- suite.addTest(StepperTestCase.getTestSuite());
+ suite.addTest(StepperTests.getTestSuite());
suite.addTest(TcfCoreTests.getTestSuite());
+ suite.addTest(TcfLaunchTests.getTestSuite());
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/launch/TcfLaunchTests.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/launch/TcfLaunchTests.java
new file mode 100644
index 0000000..f63bddd
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/launch/TcfLaunchTests.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tests.tcf.launch;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.tcf.te.launch.core.lm.LaunchManager;
+import org.eclipse.tcf.te.launch.core.lm.LaunchSpecification;
+import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification;
+import org.eclipse.tcf.te.launch.core.persistence.filetransfer.FileTransfersPersistenceDelegate;
+import org.eclipse.tcf.te.launch.core.persistence.launchcontext.LaunchContextsPersistenceDelegate;
+import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
+import org.eclipse.tcf.te.runtime.services.filetransfer.FileTransferItem;
+import org.eclipse.tcf.te.runtime.services.interfaces.filetransfer.IFileTransferItem;
+import org.eclipse.tcf.te.runtime.utils.Host;
+import org.eclipse.tcf.te.tcf.launch.core.interfaces.ILaunchTypes;
+import org.eclipse.tcf.te.tcf.launch.core.interfaces.IRemoteAppLaunchAttributes;
+import org.eclipse.tcf.te.tests.tcf.TcfTestCase;
+
+/**
+ * TCF Launch tests.
+ */
+public class TcfLaunchTests extends TcfTestCase {
+
+ /**
+ * Provides a test suite to the caller which combines all single
+ * test bundled within this category.
+ *
+ * @return Test suite containing all test for this test category.
+ */
+ public static Test getTestSuite() {
+ TestSuite testSuite = new TestSuite("TCF Launch tests"); //$NON-NLS-1$
+
+ // add ourself to the test suite
+ testSuite.addTestSuite(TcfLaunchTests.class);
+
+ return testSuite;
+ }
+
+
+ public void testRemoteAppLaunch() {
+ final ILaunchSpecification spec = new LaunchSpecification(ILaunchTypes.REMOTE_APPLICATION, ILaunchManager.RUN_MODE);
+ LaunchContextsPersistenceDelegate.setLaunchContexts(spec, new IModelNode[]{peerModel});
+
+ IPath helloWorldLocation = getHelloWorldLocation();
+ assertTrue("Missing hello world example for current OS and Arch", //$NON-NLS-1$
+ helloWorldLocation != null &&
+ helloWorldLocation.toFile().exists() &&
+ helloWorldLocation.toFile().canExecute());
+
+ String temp = System.getProperty("java.io.tmpdir"); //$NON-NLS-1$
+ IPath tempDir = temp != null ? new Path(temp) : null;
+ assertNotNull("Missing temp directory", tempDir); //$NON-NLS-1$
+
+ IPath tempHelloWorld = tempDir.append(helloWorldLocation.lastSegment());
+ if (tempHelloWorld.toFile().exists()) {
+ tempHelloWorld.toFile().delete();
+ }
+ assertFalse("Cannot delete process image " + tempHelloWorld.toOSString(), tempHelloWorld.toFile().exists()); //$NON-NLS-1$
+
+ IPath outFile = tempDir.append("/HelloWorld.out"); //$NON-NLS-1$
+ if (outFile.toFile().exists()) {
+ outFile.toFile().delete();
+ }
+ assertFalse("Cannot delete console output file " + outFile.toOSString(), outFile.toFile().exists()); //$NON-NLS-1$
+
+ FileTransfersPersistenceDelegate.setFileTransfers(spec, new IFileTransferItem[]{new FileTransferItem(helloWorldLocation, tempDir)});
+ spec.addAttribute(IRemoteAppLaunchAttributes.ATTR_PROCESS_IMAGE, tempHelloWorld.toOSString());
+
+ ILaunchConfiguration config = null;
+ try {
+ config = LaunchManager.getInstance().getLaunchConfiguration(spec, true);
+ ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
+ wc.setAttribute("org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON", false); //$NON-NLS-1$
+ wc.setAttribute("org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE", outFile.toOSString()); //$NON-NLS-1$
+ config = wc.doSave();
+ }
+ catch (Exception e) {
+ assertNull("Unexpected exception when creating launch: " + e, e); //$NON-NLS-1$
+ }
+
+ try {
+ LaunchManager.getInstance().launch(config, ILaunchManager.RUN_MODE, false, new NullProgressMonitor());
+ }
+ catch (Exception e) {
+ assertNull("Unexpected exception when launching hello world: " + e, e); //$NON-NLS-1$
+ }
+
+ assertTrue("Missing console output file", outFile.toFile().exists() && outFile.toFile().length() > 0); //$NON-NLS-1$
+ }
+
+ private IPath getHelloWorldLocation() {
+ IPath path = getDataLocation("helloWorld", true, true); //$NON-NLS-1$
+ if (path != null) {
+ path = path.append("HelloWorld"); //$NON-NLS-1$
+ if (Host.isWindowsHost()) {
+ path = path.addFileExtension("exe"); //$NON-NLS-1$
+ }
+ }
+
+ return path;
+ }
+}