blob: 9e0fd7aa678dab094cd1dd1643cc05b17ec37082 [file]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<title>
Product with nested tests
</title>
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script>
</head>
<body>
<h1>
Product with nested tests
</h1>
<h3>Layout on file system</h3>
<ul>
<li>The Java source files for a product are laid out in a package directory.</li>
<li>Source files of tests are laid out in a nested package directory.
<p><img src="images/qs-WorkingWithExistingLayout30.png" alt="Layout on file system"></p></li>
</ul>
<h3>Steps for defining a corresponding project</h3>
<ol>
<li>
<p>Click
<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.jdt.ui.JavaPerspective)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Java perspective">
<strong>Window &gt; Open Perspective &gt; Other... &gt; Java</strong></a>
to change to the Java perspective.
</p>
</li>
<li>
<p>
Click
<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.newWizard(newWizardId=org.eclipse.jdt.ui.wizards.JavaProjectWizard)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the New Java Project wizard">
<strong>File &gt; New &gt; Other... &gt; Java Project</strong></a>
to open the <strong>New Java Project</strong> wizard.
</p>
</li>
<li>
<p>Type &quot;Product1&quot; in the <strong>Project name</strong> field. Click <strong>Next</strong>.</p>
<p><img src="images/qs-WorkingWithExistingLayout31.png" alt="New Java Project wizard"></p>
</li>
<li>
<p>On the next page, Select &quot;Product1&quot; source folder.</p>
<p>Click <strong>Link additional source</strong> link in <strong>Details</strong> pane or button <img src="images/add_linked_source_to_buildpath.png" alt="Link Additional Source to Project"> in view bar.</p>
<p><img src="images/qs-WorkingWithExistingLayout32.png" alt="Java Project Source setup"></p>
</li>
<li>
<p>In <strong>Link Source</strong> click <strong>Browse....</strong> and choose the <i><code>D:\Product1\JavaSourceFiles</code></i> directory.</p>
<p>Type &quot;src&quot; in the <strong>Folder name</strong> field.</p>
<p><img src="images/qs-WorkingWithExistingLayout33.png" alt="Link Source dialog"></p>
</li>
<li>
<p>Click <strong>Finish</strong> to validate and close the dialog.</p>
</li>
<li>
<p>Expand the &quot;src&quot; source folder. Select the empty package &quot;tests&quot;
and set it as source folder using either <strong>Use as Source Folder</strong> popup-menu item
or button <img src="images/add_as_source_folder.png" alt="Use as Source Folder"> in view bar.</p>
<p><img src="images/qs-WorkingWithExistingLayout34.png" alt="Java Project Source setup"></p>
</li>
<li>
<p>Your project source setup now looks as follows:</p>
<p><img src="images/qs-WorkingWithExistingLayout35.png" alt="Java Project Source final setup"></p>
</li>
<li>
Click <strong>Finish</strong>.
</li>
<li>
You now have a Java project with two source folders: &quot;src&quot; and &quot;src/tests&quot; which contain respectively
the <i><code>D:\Product1\JavaSourceFiles</code></i> directory and the <i><code>D:\Product1\JavaSourceFiles\tests</code></i> directory.
<p><img src="images/qs-WorkingWithExistingLayout36.png" alt="Created Java project in Workspace"></p>
</li>
</ol>
<P class="nav_footer" id="nav_footer">Next Section: <A href="qs-WorkingWithExistingLayout4.htm">Products sharing a common source framework</A>
</P>
<p>
<img border="0" src="../images/ngrelc.png" alt="Related concepts" >
</p>
<p>
<a href="../concepts/concepts-3.htm">Java projects</a><br>
<a href="../concepts/cjavaviews.htm">Java views</a><br>
</p>
<p>
<img src="../images/ngrelr.png" alt="Related reference">
</p>
<p>
<a href="../reference/ref-121.htm">New Java Project Wizard</a><br>
<a href="../reference/ref-view-package-explorer.htm">Package Explorer View</a><br>
</p>
</body>
</html>