blob: 99e36326a7faa81172de8accffea56246b1e89a2 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2011. 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>
Detecting existing layout
</title>
<script language="JavaScript" type="text/javascript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script>
</head>
<body>
<h1>
Detecting existing layout
</h1>
<h3>Layout on file system</h3>
<ul>
<li>The source files for a product are laid out in one directory "src".</li>
<li>The class files are in another directory "bin".
<p><img src="images/qs-DetectingExistingLayout1.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.svg" alt="Open 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.svg" alt="Open 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;Product&quot; in the <strong>Project name</strong> field.</p>
</li>
<li>
<p>In <strong>Project layout</strong> group, change selection to <strong>Create separate source and output folders</strong>.</p>
<p>Deselect <strong>Use default location</strong>.</p>
<p>Click <strong>Browse...</strong> and choose the <i><code>Product</code></i> directory on drive <i><code>D:</code></i>.</p>
<p><img src="images/qs-DetectingExistingLayout2.png" alt="New Java Project wizard"/></p>
</li>
<li>
<p>Click <strong>Next</strong>.</p>
<p>Ensure that the source and output folders are detected.</p>
<p><img src="images/qs-DetectingExistingLayout3.png" alt="Java Project Source setup"/></p>
<p>
<em>Warning: </em>If the <strong>Scrub output folders when cleaning projects</strong> preference in the
<strong>Output folder</strong> section of the
<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.JavaBuildPreferencePage)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="Goto the building preference page"/>
<strong>Java &gt; Compiler &gt; Building</strong></a> preference page
is checked, clicking <strong>Finish</strong> will scrub the &quot;bin&quot; directory in the file system before
generating the class files. </p>
</li>
<li>
Click <strong>Finish</strong>.
</li>
<li>
You now have a Java project with a &quot;src&quot; folder which contains the sources of the &quot;Product&quot; directory.
<p><img src="images/qs-DetectingExistingLayout4.png" alt="Created Java project in Workspace"/></p>
</li>
</ol>
<p>
<em>Note: </em>This solution creates a &quot;.project&quot; file and a &quot;.classpath&quot; file in the
&quot;Product&quot; directory. If you do not wish to have these files in the &quot;Product&quot; directory,
you should use linked folders as shown in the
<a href="qs-WorkingWithExistingLayout1.htm">Sibling products in a common source tree</a> section.
</p>
<p class="nav_footer" id="nav_footer">Next Section: <a href="qs-OrganizingSources.htm">Organizing sources</a>
</p>
<h3 class="related">Related concepts</h3>
<a href="../concepts/concept-java-project.htm">Java projects</a><br/>
<a href="../concepts/concept-java-views.htm">Java views</a><br/>
<h3 class="related">Related references</h3>
<a href="../reference/ref-wizard-java-project.htm">New Java Project Wizard</a><br/>
<a href="../reference/views/ref-view-package-explorer.htm">Package Explorer View</a><br/>
</body>
</html>