blob: 2bfc7c45fda9db55b90c444ce71ea8107c0cfd42 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//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." >
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
<title>
Adding required import statements
</title>
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
</head>
<body>
<h1>
Adding required import statements
</h1>
<p>
The Java editor can help you adding required import statements for a selected type inside a compilation unit.
</p>
<ol>
<li>
Select a reference to a type in your Java code, and do one of the following:
<ul>
<li>
Select <strong>Source &gt; Add Import</strong> from the pop-up menu in the editor
</li>
<li>
Select <strong>Source &gt; Add Import</strong> from the menu bar.
</li>
<li>
Press <strong>Ctrl + Shift + M</strong>
</li>
</ul>
</li>
<li>
Either the editor can identify the type or you are prompted to choose the desired type from a list of possible types.
</li>
<li>
The import statement is generated and inserted as specified by the import order preference.
</li>
</ol>
<img src="../images/ngrelc.png" alt="Related concepts" border="0" >
<p>
<a href="../concepts/concepts-7.htm">Java editor</a>
</p>
<p>
<img src="../images/ngrelt.png" alt="Related tasks" border="0" >
</p>
<p>
<a href="tasks-54.htm">Using the Java editor</a><br>
<a href="tasks-58.htm">Managing import statements</a><br>
<a href="tasks-60.htm">Organizing existing import statements</a><br>
<a href="tasks-61.htm">Setting the order of import statements</a>
</p>
<p>
<img src="../images/ngrelr.png" alt="Related reference" border="0" ><br>
<a href="../reference/ref-menu-source.htm">Source menu</a>
</p>
</body>
</html>